boolean (@NotNull PsiMethod method) { for (HierarchicalMethodSignature methodSignature : method.getHierarchicalMethodSignature().getSuperSignatures()) { PsiMethod objectMethod = methodSignature.getMethod(); PsiClass containingClass = objectMethod.getContainingClass(); if (containingClass != null && CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName()) && objectMethod.hasModifierProperty(PsiModifier.PUBLIC)) { return true; } if (doesMethodOverrideMemberOfJavaLangObject(objectMethod)) return true; } return false; }