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