void addRecordHeader(@Nullable PsiMethod canonicalCtor, @NotNull Map<PsiField, @Nullable FieldAccessorCandidate> fieldAccessors) {
    myRecordText.append("(");
    StringJoiner recordComponentsJoiner = new StringJoiner(",");
    if (canonicalCtor == null) {
      fieldAccessors.forEach(
        (field, fieldAccessor) -> recordComponentsJoiner.add(generateComponentText(field, field.getType(), fieldAccessor)));
    }
    else {
      Arrays.stream(canonicalCtor.getParameterList().getParameters())
        .map(parameter -> generateComponentText(parameter, fieldAccessors))
        .forEach(recordComponentsJoiner::add);
    }
    myRecordText.append(recordComponentsJoiner);
    myRecordText.append(")");
  }
void addRecordHeader(@Nullable PsiMethod canonicalCtor, @NotNull Map<PsiField, @Nullable FieldAccessorCandidate> fieldAccessors)