From 72fd50b9f1db1ab6bfc1753ba6a1e686a2f0f22c Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 8 May 2017 21:11:15 +0200 Subject: moved an update to the website text about the jdk8 onX support to the new website templates. --- website2/templates/features/constructor.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'website2/templates/features/constructor.html') diff --git a/website2/templates/features/constructor.html b/website2/templates/features/constructor.html index fb331113..6a12fa2a 100644 --- a/website2/templates/features/constructor.html +++ b/website2/templates/features/constructor.html @@ -45,7 +45,7 @@

Even if a field is explicitly initialized with null, lombok will consider the requirement to avoid null as fulfilled, and will NOT consider the field as a 'required' argument. The assumption is that if you explicitly assign null to a field that you've also marked as @NonNull signals you must know what you're doing.

- 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 @ConstructorProperties annotation is also omitted for private constructors. The generated static factory methods also do not get @ConstructorProperties, as this annotation can only be added to real constructors. + 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.

-- cgit