Randgalt / record-builder

Record builder generator for Java records
Apache License 2.0
749 stars 53 forks source link

Builder construction #186

Open CfFanDuel opened 2 months ago

CfFanDuel commented 2 months ago

Given a record named Foo a builder named FooBuilder is generated.

To generate a builder you have to do FooBuilder.builder() which feels a bit long winded and repetitive.

Potential solutions:

CfFanDuel commented 2 months ago

Just realised I can use this option to overwrite it:

boolean publicBuilderConstructors() default false;

So that solves my problem, though I wonder if the default should be true :)

CfFanDuel commented 2 months ago

Though the above doesn't help with Staged builders as using the public constructor bypasses the staging...