@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
    return new JavaElementVisitor() {
      @Override
      public void visitClass(@NotNull PsiClass aClass) {
        if (aClass.isRecord()) {
          if (InspectionProjectProfileManager.isInformationLevel(getShortName(), aClass)) {
            PsiElement brace = aClass.getLBrace();
            if (brace != null) {
              holder.problem(aClass, JavaBundle.message("inspection.message.record.can.be.converted.to.class"))
                .range(TextRange.create(0, brace.getStartOffsetInParent() + brace.getTextLength()))
                .fix(new ConvertRecordToClassFix(aClass)).register();
            }
            else {
              holder.problem(aClass, JavaBundle.message("inspection.message.record.can.be.converted.to.class")).fix(new ConvertRecordToClassFix(aClass)).register();
            }
          }
          else {
            PsiIdentifier identifier = aClass.getNameIdentifier();
            if (identifier != null) {
              holder.problem(identifier, JavaBundle.message("inspection.message.record.can.be.converted.to.class")).fix(new ConvertRecordToClassFix(aClass)).register();
            }
          }
        }
      }
    };
  }
@Override
  public @NotNull PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly)