List<PsiClass> (PsiClassType @NotNull [] classTypes) { List<PsiClass> classes = new ArrayList<>(); for (PsiClassType classType : classTypes) { PsiClass aClass = classType.resolve(); if (aClass != null) classes.add(aClass); } return classes; }