protected static boolean hasField(PsiClass targetClass, PsiField field) {
    final PsiField fieldByName = targetClass.findFieldByName(field.getName(), true);
    return fieldByName != null && fieldByName != field;
  }
protected static boolean hasField(PsiClass targetClass, PsiField field)