void (PsiType type, Processor<? super PsiClass> processor) { if (type instanceof PsiClassType) { final PsiClassType classType = (PsiClassType)type; 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); } } } }