You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support static factory methods for referenced builder creation #309
Accept a public static parameterless factory (e.g. create(), MapStruct-style) as an instantiation path alongside B(). When a factory taking the value exists (e.g. create(T) / of(T)), prefer it over the copy constructor. Generated helper code calls the factory instead of new when present.
Why
Generated builders expose create(), but the contract only recognizes constructors — generated code always instantiates via new, so own builders' static creation paths are unusable when referenced across compilation units.
Activity
Support static factory methods for referenced builders (java-helpers#309
Accept static factories in the referenced-builder contract (#309) (#315)