Sub-task of #301.
Goal
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.
Sub-task of #301.
Goal
Accept a public static parameterless factory (e.g.
create(), MapStruct-style) as an instantiation path alongsideB(). 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 ofnewwhen present.Why
Generated builders expose
create(), but the contract only recognizes constructors — generated code always instantiates vianew, so own builders' static creation paths are unusable when referenced across compilation units.