boolean (PsiMethod method, PsiClass methodClass) { final PsiMethod[] superMethods = method.findSuperMethods(); for (PsiMethod superMethod : superMethods) { final PsiClass superClass = superMethod.getContainingClass(); if (ignoreSuperMethod(method, methodClass, superMethod, superClass)) { continue; } if (superClass.isInterface()) { continue; } if (methodClass.isInterface() && superMethod.hasModifierProperty(PsiModifier.PROTECTED)) { // only true for J2SE java.lang.Object.clone(), but might // be different on other/newer java platforms continue; } return true; } return false; }