boolean (MethodSignature methodSignature) { LOG.assertTrue(myClass.isValid()); PsiMethod superEquals = MethodSignatureUtil.findMethodBySignature(myClass, methodSignature, true); if (superEquals == null) return true; PsiClass containingClass = superEquals.getContainingClass(); //implicit equals e.g. generated by lombok if (containingClass == myClass) { return Arrays.stream(superEquals.findSuperMethods()).anyMatch(superMethod -> { PsiClass superClass = superMethod.getContainingClass(); return !superMethod.hasModifierProperty(PsiModifier.ABSTRACT) && superClass != null && !CommonClassNames.JAVA_LANG_OBJECT.equals(superClass.getQualifiedName()); }); } if (superEquals.hasModifierProperty(PsiModifier.ABSTRACT)) return false; if (containingClass == null) return false; return !CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName()); }