From ed61012f95cefae8d03260f506ffe34bc19bd90c Mon Sep 17 00:00:00 2001
From: Reinier Zwitserloot MapEntry.of("foo", 5)
instead of the much longer
new MapEntry<String, Integer>("foo", 5)
.
- To put annotations on the generated constructor, you can use onConstructor={@AnnotationsHere}
. For more details see the documentation on the onX feature.
+ To put annotations on the generated constructor, you can use onConstructor=@_({@AnnotationsHere})
, but be careful; this is an experimental feature. For more details see the documentation on the onX feature.
Static fields are skipped by these annotations. Also, a @java.beans.ConstructorProperties
annotation is added for all constructors with at least 1 argument,
which allows bean editor tools to call the generated constructors. @ConstructorProperties
is now in Java 1.6, which means that if your code is intended for
diff --git a/website/features/GetterSetter.html b/website/features/GetterSetter.html
index dde3456b..03704119 100644
--- a/website/features/GetterSetter.html
+++ b/website/features/GetterSetter.html
@@ -29,7 +29,7 @@
You can always manually disable getter/setter generation for any field by using the special AccessLevel.NONE
access level. This lets you override the
behaviour of a @Getter
, @Setter
or @Data
annotation on a class.
- To put annotations on the generated method, you can use onMethod={@AnnotationsHere}
; to put annotations on the only parameter of a generated setter method, you can use onParam={@AnnotationsHere}
. For more details see the documentation on the onX feature.
+ To put annotations on the generated method, you can use onMethod=@_({@AnnotationsHere})
; to put annotations on the only parameter of a generated setter method, you can use onParam=@_({@AnnotationsHere})
. Be careful though! This is an experimental feature. For more details see the documentation on the onX feature.
@Wither(level = AccessLevel.PROTECTED)
. Also like @Setter
, you can also put a @Wither
annotation on a type, which means
a 'wither' is generated for each field (even non-final fields).
- To put annotations on the generated method, you can use onMethod={@AnnotationsHere}
; to put annotations on the only parameter of this method, you can use onParam={@AnnotationsHere}
. For more details see the documentation on the onX feature.
+ To put annotations on the generated method, you can use onMethod=@_({@AnnotationsHere})
; to put annotations on the only parameter of a generated wither method, you can use onParam=@_({@AnnotationsHere})
. Be careful though! This is an experimental feature. For more details see the documentation on the onX feature.
@Accessors
@ExtensionMethod
@ExtensionMethod
@FieldDefaults
@FieldDefaults
@Wither
@Wither
@Value
@Value
onMethod= / onConstructor= / onParam