@Nullable
  private static HighlightInfo.Builder checkRecordSpecialMethodDeclaration(@NotNull PsiMethod method, @NotNull @Nls String methodTitle) {
    PsiIdentifier identifier = method.getNameIdentifier();
    if (identifier == null) return null;
    PsiTypeParameterList typeParameterList = method.getTypeParameterList();
    if (typeParameterList != null && typeParameterList.getTypeParameters().length > 0) {
      HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(typeParameterList)
        .descriptionAndTooltip(JavaErrorBundle.message("record.special.method.type.parameters", methodTitle));
      IntentionAction action = QuickFixFactory.getInstance().createDeleteFix(typeParameterList);
      info.registerFix(action, null, null, null, null);
      return info;
    }
    if (method.isConstructor()) {
      AccessModifier modifier = AccessModifier.fromModifierList(method.getModifierList());
      PsiModifierList classModifierList = Objects.requireNonNull(method.getContainingClass()).getModifierList();
      if (classModifierList != null) {
        AccessModifier classModifier = AccessModifier.fromModifierList(classModifierList);
        if (classModifier.isWeaker(modifier)) {
          HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(identifier)
            .descriptionAndTooltip(JavaErrorBundle.message("record.special.method.stronger.access", methodTitle, classModifier));
          IntentionAction action = QuickFixFactory.getInstance().createModifierListFix(
            method, classModifier.toPsiModifier(), true, false);
          info.registerFix(action, null, null, null, null);
          return info;
        }
      }
    } else if (!method.hasModifierProperty(PsiModifier.PUBLIC)) {
      HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(identifier)
        .descriptionAndTooltip(JavaErrorBundle.message("record.special.method.non.public", methodTitle));
      IntentionAction action = QuickFixFactory.getInstance().createModifierListFix(method, PsiModifier.PUBLIC, true, false);
      info.registerFix(action, null, null, null, null);
      return info;
    }
    PsiReferenceList throwsList = method.getThrowsList();
    if (throwsList.getReferenceElements().length > 0) {
      HighlightInfo.Builder info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(throwsList.getFirstChild())
        .descriptionAndTooltip(JavaErrorBundle.message("record.special.method.throws", StringUtil.decapitalize(methodTitle)));
      IntentionAction action = QuickFixFactory.getInstance().createDeleteFix(throwsList);
      info.registerFix(action, null, null, null, null);
      return info;
    }
    return null;
  }
@Nullable
  private static HighlightInfo.Builder checkRecordSpecialMethodDeclaration(@NotNull PsiMethod method, @NotNull @Nls String methodTitle)