PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { PsiFile file = holder.getFile(); if (file instanceof PsiJavaFile && ((PsiJavaFile)file).getLanguageLevel().isAtLeast(LanguageLevel.JDK_1_9)) { return new JavaElementVisitor() { @Override public void visitMethodCallExpression(@NotNull PsiMethodCallExpression expression) { checkMethodCall(expression, holder); super.visitMethodCallExpression(expression); } }; } return PsiElementVisitor.EMPTY_VISITOR; }