Skip to content

Conversation

@mtf90
Copy link

@mtf90 mtf90 commented May 19, 2019

Adds two new fields on the @Option annotation to configure whether or not a parameter is required during the instantiation of the builder or during the creation of the object to be built.

In combination with the fix for successfully suppressing the generation of get/set/with methods, this allows preconfiguring a builder with a set of immutable parameters and/or enforce the user to provide mandatory parameters at creation time.

In case of a conflicting configuration, e.g. when a default value is specified simultaneously, a warning is logged and the annotation processor gracefully prefers the attributes during instantiation/creation.

This feature is fully backwards-compatible, as this additional functionality is disabled by default and hence behaves like the current/latest version.

mtf90 added 3 commits May 19, 2019 17:22
Adds two new fields on the @option annotation to configure whether or not a parameter is required during the instantiation of the builder (to fix a set of immutable parameters) or during the creation of the object to be build (to enforce providing mandatory parameters).

In case of conflicting configuration, e.g. when a default value is specified simultaneously, a warning is logged and the annotation processor gracefully prefers the attributes during instantiation/creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant