inferred / FreeBuilder

Automatic generation of the Builder pattern for Java
Apache License 2.0
838 stars 101 forks source link

Make Metadata.getBuilder not Nullable #330

Closed alicederyn closed 5 years ago

alicederyn commented 5 years ago

Metadata needs to support two distinct code generation paths: generating the usual FreeBuilder superclass; and generating a stub for the user to extend. This means Metadata needs to mark its Builder property as nullable, obfuscating what data is available where in the code. Instead, move responsibility for choosing a code generator to Analyser, and move stub code generation into a new GeneratedStub type.