private void collectSupers(PsiClass psiClass, ArrayList<? super PsiClass> classes) {
    classes.add(psiClass);

    final PsiClass[] supers = psiClass.getSupers();
    for (PsiClass aSuper : supers) {
      if (classes.contains(aSuper)) continue;
      if (canBeTargetClass(aSuper)) {
        collectSupers(aSuper, classes);
      }
    }
  }
private void collectSupers(PsiClass psiClass, ArrayList<? super PsiClass> classes)