boolean (@NotNull PsiType psiType, @NotNull Predicate<? super LanguageLevel> level) { if (!(psiType instanceof PsiClassType)) return true; return level.test(((PsiClassType)psiType).getLanguageLevel()); }