@Override
  public void visitModuleStatement(@NotNull PsiStatement statement) {
    if (statement instanceof PsiRequiresStatement requiresStatement) {
      PsiJavaModule module = requiresStatement.resolve();
      if (module == null) return;

      PsiAnnotation annotation = getPreviewFeatureAnnotation(module);
      @Nullable JavaFeature feature = PreviewFeatureUtil.fromPreviewFeatureAnnotation(annotation);
      if (feature == null) return;

      String description = JavaBundle.message("inspection.preview.feature.0.is.preview.api.message", module.getName());
      registerProblem(requiresStatement.getReferenceElement(), description, feature, annotation);
    }
    else if (statement instanceof PsiProvidesStatement providesStatement) {
      PsiReferenceList list = providesStatement.getImplementationList();
      if (list == null) return;

      for (PsiJavaCodeReferenceElement element : list.getReferenceElements()) {
        PsiElement resolved = element.resolve();
        if (resolved instanceof PsiClass psiClass) {
          PsiAnnotation annotation = getPreviewFeatureAnnotation(psiClass);
          JavaFeature feature = PreviewFeatureUtil.fromPreviewFeatureAnnotation(annotation);
          if (feature == null) continue;
          String description =
            JavaBundle.message("inspection.preview.feature.0.is.preview.api.message", psiClass.getQualifiedName());
          registerProblem(element, description, feature, annotation);
        }
      }
    }
  }
@Override
  public void visitModuleStatement(@NotNull PsiStatement statement)