private static boolean processSuperTypes(PsiType type, Processor<? super PsiType> processor, Set<? super PsiType> visited) {
    if (!visited.add(type)) return true;
    for (PsiType superType : type.getSuperTypes()) {
      if (!processor.process(superType)) return false;
      processSuperTypes(superType, processor, visited);
    }
    return true;
  }
private static boolean processSuperTypes(PsiType type, Processor<? super PsiType> processor, Set<? super PsiType> visited)