From becb12658ef60a926d420ea83251040c28eed126 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 15 Oct 2018 21:21:49 +0200 Subject: Remove references to suppressConstructorProperties, fixes #1873 --- website/templates/features/constructor.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/website/templates/features/constructor.html b/website/templates/features/constructor.html index fc0be1c6..b1f25321 100644 --- a/website/templates/features/constructor.html +++ b/website/templates/features/constructor.html @@ -17,7 +17,7 @@

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 new in Java 1.6, which means that if your code is intended for compilation on Java 1.5, a compiler error will occur. Running on a JVM 1.5 should be no problem (the annotation will be ignored). To suppress the generation of the @ConstructorProperties annotation, add a parameter to your annotation: @AllArgsConstructor(suppressConstructorProperties=true). However, as java 1.5, which has already been end-of-lifed, fades into obscurity, this parameter will eventually be removed. It has also been marked deprecated for this reason. + Static fields are skipped by these annotations.

Unlike most other lombok annotations, the existence of an explicit constructor does not stop these annotations from generating their own constructor. This means you can write your own specialized constructor, and let lombok generate the boilerplate ones as well. If a conflict arises (one of your constructors ends up with the same signature as one that lombok generates), a compiler error will occur.

@@ -27,9 +27,9 @@ <@f.confKeys>
- lombok.anyConstructor.suppressConstructorProperties = [true | false] (default: false) + lombok.anyConstructor.addConstructorProperties = [true | false] (default: false)
- If set to true, then lombok will skip adding a @java.beans.ConstructorProperties to generated constructors. This is useful in android and GWT development where that annotation is not usually available. + If set to true, then lombok will add a @java.beans.ConstructorProperties to generated constructors.
lombok.[allArgsConstructor|requiredArgsConstructor|noArgsConstructor].flagUsage = [warning | error] (default: not set)
@@ -48,8 +48,6 @@ The @java.beans.ConstructorProperties annotation is never generated for a constructor with no arguments. This also explains why @NoArgsConstructor lacks the suppressConstructorProperties annotation method. The generated static factory methods also do not get @ConstructorProperties, as this annotation can only be added to real constructors.

@XArgsConstructor can also be used on an enum definition. The generated constructor will always be private, because non-private constructors aren't legal in enums. You don't have to specify AccessLevel.PRIVATE. -

- While suppressConstructorProperties has been marked deprecated in anticipation of a world where all java environments have the @ConstructorProperties annotation available, first GWT 2.2 and Android 2.3.3, which do not (yet) have this annotation, will have to be ancient history before this annotation parameter will be removed.

Various well known annotations about nullity cause null checks to be inserted and will be copied to the parameter. See Getter/Setter documentation's small print for more information.

-- cgit