From fd1d18a29957fc1999b7dd5725641662ad3bd887 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 22 Jul 2015 04:40:19 +0200 Subject: Support for @NoArgsConstructor(force = true). --- website/features/Constructor.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'website/features/Constructor.html') diff --git a/website/features/Constructor.html b/website/features/Constructor.html index cbb76fcf..d7168372 100644 --- a/website/features/Constructor.html +++ b/website/features/Constructor.html @@ -17,8 +17,7 @@

This set of 3 annotations generate a constructor that will accept 1 parameter for certain fields, and simply assigns this parameter to the field.

- @NoArgsConstructor will generate a constructor with no parameters. If this is not possible (because of final fields), a compiler error will result instead. - For fields with constraints, such as @NonNull fields, no check or assignment is generated, so be aware that these constraints may then not be + @NoArgsConstructor will generate a constructor with no parameters. If this is not possible (because of final fields), a compiler error will result instead, unless @NoArgsConstructor(force = true) is used, then all final fields are initialized with 0 / false / null. For fields with constraints, such as @NonNull fields, no check or assignment is generated, so be aware that these constraints may then not be fulfilled until those fields are properly initialized later. Certain java constructs, such as hibernate and the Service Provider Interface require a no-args constructor. This annotation is useful primarily in combination with either @Data or one of the other constructor generating annotations.

-- cgit