boolean (@Nullable PsiClass aClass) { if (aClass == null) { return false; } if (!aClass.hasModifierProperty(PsiModifier.FINAL) && !hasOnlyPrivateConstructors(aClass)) { return false; } final PsiMethod[] methods = aClass.findMethodsByName("equals", true); for (PsiMethod method : methods) { if (!MethodUtils.isEquals(method)) { continue; } final PsiClass containingClass = method.getContainingClass(); if (containingClass == null || !CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName())) { return false; } } return true; }