static HighlightInfo.Builder checkPublicClassInRightFile(@NotNull PsiClass aClass) {
    PsiFile containingFile = aClass.getContainingFile();
    if (aClass.getParent() != containingFile || !aClass.hasModifierProperty(PsiModifier.PUBLIC) || !(containingFile instanceof PsiJavaFile file))
      return null;
    VirtualFile virtualFile = file.getVirtualFile();
    if (virtualFile == null || virtualFile.getNameWithoutExtension().equals(aClass.getName())) {
      return null;
    }
    if (JavaHighlightUtil.isJavaHashBangScript(file)) return null;
    String message = JavaErrorBundle.message("public.class.should.be.named.after.file", aClass.getName());
    TextRange range = HighlightNamesUtil.getClassDeclarationTextRange(aClass);
    HighlightInfo.Builder errorResult = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).
      range(aClass, range.getStartOffset(), range.getEndOffset()).
      descriptionAndTooltip(message);
    PsiClass[] classes = file.getClasses();
    boolean containsClassForFile = ContainerUtil.exists(classes, otherClass ->
      !otherClass.getManager().areElementsEquivalent(otherClass, aClass) &&
      otherClass.hasModifierProperty(PsiModifier.PUBLIC) &&
      virtualFile.getNameWithoutExtension().equals(otherClass.getName()));
    if (!containsClassForFile) {
      IntentionAction action = QuickFixFactory.getInstance().createRenameFileFix(aClass.getName() + JavaFileType.DOT_DEFAULT_EXTENSION);
      errorResult.registerFix(action, null, null, null, null);
    }
    if (classes.length > 1) {
      IntentionAction action = QuickFixFactory.getInstance().createMoveClassToSeparateFileFix(aClass);
      errorResult.registerFix(action, null, null, null, null);
    }
    IntentionAction action1 = QuickFixFactory.getInstance().createModifierListFix(aClass, PsiModifier.PUBLIC, false, false);
    errorResult.registerFix(action1, null, null, null, null);
    if (!containsClassForFile) {
      IntentionAction action = QuickFixFactory.getInstance().createRenameElementFix(aClass);
      errorResult.registerFix(action, null, null, null, null);
    }
    return errorResult;
  }
static HighlightInfo.Builder checkPublicClassInRightFile(@NotNull PsiClass aClass)