-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-generate BuilderConstructors #4
Comments
arjanvlek
added a commit
that referenced
this issue
Jan 14, 2019
AbstractBuilder can now automatically generate the required `BuilderConstructors` used to obtain references to a `BuildCommand` given an Entity. This is done by accessing the no-args constructor of the entity and the BuildCommand class. For customization and backwards compatibility, it's still possible to override the `constructors()` method of `AbstractBuilder` and supply your own set of `BuilderConstructors` Fixes #4
arjanvlek
added a commit
that referenced
this issue
Jan 17, 2019
AbstractBuilder can now automatically generate the required `BuilderConstructors` used to obtain references to a `BuildCommand` given an Entity. This is done by accessing the no-args constructor of the entity and the BuildCommand class. For customization and backwards compatibility, it's still possible to override the `constructors()` method of `AbstractBuilder` and supply your own set of `BuilderConstructors` Fixes #4
Fixed in ca1f399 |
arjanvlek
added a commit
that referenced
this issue
Jan 25, 2019
AbstractBuilder can now automatically generate the required `BuilderConstructors` used to obtain references to a `BuildCommand` given an Entity. This is done by accessing the no-args constructor of the entity and the BuildCommand class. For customization and backwards compatibility, it's still possible to override the `constructors()` method of `AbstractBuilder` and supply your own set of `BuilderConstructors` Fixes #4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, when creating a builder by extending from
AbstractBuilder
, it is required to implement the methodconstructors()
, which returns an instance ofBeanConstructors
for your builder.However, from practice it seems that almost always the same pattern to make an instance of builderConstructors is used. That pattern is the following:
in the BuildCommand class:
in the Builder class:
By auto-generating the
BuilderConstructors
definition the method override and the 2 constructors inMyBuildCommand
can be omitted from a builder.The text was updated successfully, but these errors were encountered: