static HighlightInfo.@Nullable Builder checkImplicitClassHasMainMethod(@NotNull PsiJavaFile file) {
    if (!PsiUtil.isAvailable(JavaFeature.IMPLICIT_CLASSES, file)) return null;
    PsiImplicitClass implicitClass = JavaImplicitClassUtil.getImplicitClassFor(file);
    if (implicitClass == null) return null;
    PsiMethod[] methods = implicitClass.getMethods();
    boolean hasMainMethod = ContainerUtil.exists(methods, method -> "main".equals(method.getName()) && PsiMethodUtil.isMainMethod(method));
    if (!hasMainMethod) {
      return HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR)
                     .range(file)
                     .fileLevelAnnotation()
                     .registerFix(QuickFixFactory.getInstance().createAddMainMethodFix(implicitClass), null, null, null, null)
                     .description(JavaErrorBundle.message("error.implicit.class.contains.no.main.method"));
    }
    return null;
  }
static HighlightInfo.@Nullable Builder checkImplicitClassHasMainMethod(@NotNull PsiJavaFile file)