boolean (final PsiMethod method, final PsiClass psiClass, final PsiClass initialClass, final Set<? super PsiClass> visitedClasses) { if (!visitedClasses.add(psiClass)) { return false; } if (initialClass != psiClass && methodOverloads(method, psiClass)) { registerMethodError(method); return true; } else { if (PsiUtil.isLanguageLevel8OrHigher(method)) { for (PsiClass superClass : psiClass.getSupers()) { if (processSupers(method, superClass, initialClass, visitedClasses)) { return true; } } } else { final PsiClass superClass = psiClass.getSuperClass(); if (superClass != null) { return processSupers(method, superClass, initialClass, visitedClasses); } } } return false; }