boolean (final ClassRepr fromClass, final Predicate<? super MethodRepr> predicate, IntSet visitedClasses, ClassRepr visibilityScope) { if (visitedClasses == null) { visitedClasses = new IntOpenHashSet(); visitedClasses.add(fromClass.name); } for (TypeRepr.ClassType superName : fromClass.getSuperTypes()) { if (!visitedClasses.add(superName.className) || superName.className == myObjectClassName) { continue; } for (ClassRepr superClass : reprsByName(superName.className, ClassRepr.class)) { for (MethodRepr mm : superClass.findMethods(predicate)) { if (isVisibleIn(superClass, mm, visibilityScope)) { return true; } } if (hasOverriddenMethods(superClass, predicate, visitedClasses, visibilityScope)) { return true; } } } return false; }