PsiMethod (PsiClass aClass, @NotNull String propertyName, boolean isStatic, boolean checkSuperClasses) { if (aClass == null) return null; String setterName = suggestSetterName(propertyName); PsiMethod[] methods = aClass.findMethodsByName(setterName, checkSuperClasses); for (PsiMethod method : methods) { if (method.hasModifierProperty(PsiModifier.STATIC) != isStatic) continue; if (isSimplePropertySetter(method)) { if (getPropertyNameBySetter(method).equals(propertyName)) { return method; } } } return null; }