diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-07-16 00:51:31 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-07-16 00:51:31 +0200 |
commit | 7af9add9996f2efab6cccc50c5503b3457534930 (patch) | |
tree | bd224bd341da31e1b5aba5e718f43b6fd1227e8d /src/core/lombok/experimental | |
parent | ec0cc4348cf71d872b796d0733fb64fc576ef5df (diff) | |
download | lombok-7af9add9996f2efab6cccc50c5503b3457534930.tar.gz lombok-7af9add9996f2efab6cccc50c5503b3457534930.tar.bz2 lombok-7af9add9996f2efab6cccc50c5503b3457534930.zip |
* Fixed issues with @FieldDefaults and @Value (you can NOT override
@Value's final-by-default and private-by-default with it; now
appropriate warnings are emitted)
* Builder now errors out on presence of most lombok annotations on an
explicit builder class.
* Builder now takes @FieldDefaults/@Value into account.
* Builder on type now generates the constructor as package private
instead of private to avoid synthetic accessor constructors.
* added a bunch of test cases.
* added a test case feature: If the expected file is omitted entirely
but there are expected messages, the differences in the output itself
are ignored.
* streamlined checking for boolean-ness (removed some duplicate code)
* added 'fluent' and 'chain' to @Builder.
Diffstat (limited to 'src/core/lombok/experimental')
-rw-r--r-- | src/core/lombok/experimental/Builder.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/lombok/experimental/Builder.java b/src/core/lombok/experimental/Builder.java index 5f2d1ca6..1300e7d3 100644 --- a/src/core/lombok/experimental/Builder.java +++ b/src/core/lombok/experimental/Builder.java @@ -118,4 +118,20 @@ public @interface Builder { * Default for {@code @Builder} on static methods: {@code (ReturnTypeName)Builder}. */ String builderClassName() default ""; + + /** + * Normally the builder's 'set' methods are fluent, meaning, they have the same name as the field. Set this + * to {@code false} to name the setter method for field {@code someField}: {@code setSomeField}. + * <p> + * <strong>Default: true</strong> + */ + boolean fluent() default true; + + /** + * Normally the builder's 'set' methods are chaining, meaning, they return the builder so that you can chain + * calls to set methods. Set this to {@code false} to have these 'set' methods return {@code void} instead. + * <p> + * <strong>Default: true</strong> + */ + boolean chain() default true; } |