@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
    return new JavaElementVisitor() {
      @Override
      public void visitJavaFile(@NotNull PsiJavaFile file) {
        if (PsiPackage.PACKAGE_INFO_FILE.equals(file.getName())) {
          checkFile(file, holder);
        }
      }

      @Override
      public void visitModule(@NotNull PsiJavaModule module) {
        checkModule(module, holder);
      }

      @Override
      public void visitClass(@NotNull PsiClass aClass) {
        checkClass(aClass, holder);
      }

      @Override
      public void visitField(@NotNull PsiField field) {
        checkField(field, holder);
      }

      @Override
      public void visitMethod(@NotNull PsiMethod method) {
        checkMethod(method, holder);
      }
    };
  }
@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly)