boolean (PsiMethod method, Set<PsiMethod> seen) { if (!seen.add(method)) { return true; } PsiMethod[] superMethods = method.findSuperMethods(); final PsiMethod siblingInherited = FindSuperElementsHelper.getSiblingInheritedViaSubClass(method); if (siblingInherited != null && !ArrayUtil.contains(siblingInherited, superMethods)) { superMethods = ArrayUtil.append(superMethods, siblingInherited); } for (final PsiMethod superMethod : superMethods) { final PsiClass superClass = superMethod.getContainingClass(); if (superClass == null) { continue; } if (superClass.isInterface()) { return true; } final String superclassName = superClass.getQualifiedName(); if (CommonClassNames.JAVA_LANG_OBJECT.equals(superclassName)) { return true; } if (exposedInInterface(superMethod, seen)) { return true; } } return false; }