aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-07-22 04:40:19 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-07-22 04:40:19 +0200
commitfd1d18a29957fc1999b7dd5725641662ad3bd887 (patch)
tree0795b1970d09ba39e97133afaba35370799b8b41 /website
parent334580ee548ddb09e34564183aba5008fdb29a22 (diff)
downloadlombok-fd1d18a29957fc1999b7dd5725641662ad3bd887.tar.gz
lombok-fd1d18a29957fc1999b7dd5725641662ad3bd887.tar.bz2
lombok-fd1d18a29957fc1999b7dd5725641662ad3bd887.zip
Support for @NoArgsConstructor(force = true).
Diffstat (limited to 'website')
-rw-r--r--website/features/Constructor.html3
1 files changed, 1 insertions, 2 deletions
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 @@
<p>
This set of 3 annotations generate a constructor that will accept 1 parameter for certain fields, and simply assigns this parameter to the field.
</p><p>
- <code>@NoArgsConstructor</code> 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 <code>@NonNull</code> fields, <em>no</em> check or assignment is generated, so be aware that these constraints may then not be
+ <code>@NoArgsConstructor</code> will generate a constructor with no parameters. If this is not possible (because of final fields), a compiler error will result instead, unless <code>@NoArgsConstructor(force = true)</code> is used, then all final fields are initialized with 0 / false / null. For fields with constraints, such as <code>@NonNull</code> fields, <em>no</em> 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 <code>@Data</code> or one of the other constructor generating annotations.
</p><p>