public static boolean processSuperTypes(@NotNull PsiType type, boolean includeSelf, @NotNull Processor<? super PsiType> processor) {
    if (includeSelf && !processor.process(type)) return false;
    return processSuperTypes(type, processor, new HashSet<>());
  }
public static boolean processSuperTypes(@NotNull PsiType type, boolean includeSelf, @NotNull Processor<? super PsiType> processor)