private static void processExceptionClasses(PsiType type, Processor<? super PsiClass> processor) {
      if (type instanceof PsiClassType classType) {
        final PsiClass aClass = classType.resolve();
        if (aClass != null) {
          processor.process(aClass);
        }
      }
      else if (type instanceof PsiDisjunctionType disjunctionType) {
        for (PsiType disjunction : disjunctionType.getDisjunctions()) {
          if (!(disjunction instanceof PsiClassType classType)) {
            continue;
          }
          final PsiClass aClass = classType.resolve();
          if (aClass != null) {
            processor.process(aClass);
          }
        }
      }
    }
private static void processExceptionClasses(PsiType type, Processor<? super PsiClass> processor)