void (PsiClass aClass, PsiClass bClass, Set<PsiClass> supers, Set<? super PsiClass> visited) { if (bClass.isInheritor(aClass, true)) { addSuper(supers, aClass); } else { final PsiClass[] aSupers = aClass.getSupers(); for (PsiClass aSuper : aSupers) { if (visited.add(aSuper)) { getLeastUpperClassesInner(aSuper, bClass, supers, visited); } } } }