Annotation Type Builder
@Target(TYPE)
public @interface Builder
Annotate any Java record with this annotation to create a builder class for it.
As an example, the following record can be built like this:
{@literal @}Builder
public record Person(
String firstName,
String lastName,
LocalDate birthDate,
int heightInCentimeters){}
PersonBuilder.builder()
.withFirstName("Frank")
.withLastName("Meier")
.withBirthDate(LocalDate.of(1990, 2, 2))
.withHeightInCentimeters(170)
.build()