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