diff options
author | Jan Rieke <rieke@subshell.com> | 2018-09-24 16:46:00 +0200 |
---|---|---|
committer | Jan Rieke <rieke@subshell.com> | 2018-09-24 16:46:00 +0200 |
commit | b5648976b6501bdf755814d8d8a096c33f6997ec (patch) | |
tree | aafe939cdc6fdda41719deb42f03c77934cb5209 /website/templates/features/GetterSetter.html | |
parent | fd4c9d4bff6e75b30a3ee247edafaabc6888a691 (diff) | |
parent | aee4e76d864e01b5d453409e703ad54852fa57bb (diff) | |
download | lombok-b5648976b6501bdf755814d8d8a096c33f6997ec.tar.gz lombok-b5648976b6501bdf755814d8d8a096c33f6997ec.tar.bz2 lombok-b5648976b6501bdf755814d8d8a096c33f6997ec.zip |
Merge remote-tracking branch 'upstream/master' into superToBuilder
Diffstat (limited to 'website/templates/features/GetterSetter.html')
-rw-r--r-- | website/templates/features/GetterSetter.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/website/templates/features/GetterSetter.html b/website/templates/features/GetterSetter.html index 1baa5bd0..04cd1ec7 100644 --- a/website/templates/features/GetterSetter.html +++ b/website/templates/features/GetterSetter.html @@ -58,7 +58,9 @@ </p><p> Any variation on <code>boolean</code> will <em>not</em> result in using the <code>is</code> prefix instead of the <code>get</code> prefix; for example, returning <code>java.lang.Boolean</code> results in a <code>get</code> prefix, not an <code>is</code> prefix. </p><p> - Any annotations named <code>@NonNull</code> (case insensitive) on the field are interpreted as: This field must not ever hold <em>null</em>. Therefore, these annotations result in an explicit null check in the generated setter. Also, these annotations (as well as any annotation named <code>@Nullable</code> or <code>@CheckForNull</code>) are copied to setter parameter and getter method. + A number of annotations from popular libraries that indicate non-nullness, such as <code>javax.annotation.Nonnull</code>, if present on the field, result in an explicit null check in the generated setter. + </p><p> + Various well-known annotations about nullability, such as <code>org.eclipse.jdt.annotation.NonNull</code>, are automatically copied over to the right place (method for getters, parameter for setters). You can specify additional annotations that should always be copied via lombok <a href="/features/configuration">configuration key</a> <code>lombok.copyableAnnotations</code>. </p><p> You can annotate a class with a <code>@Getter</code> or <code>@Setter</code> annotation. Doing so is equivalent to annotating all non-static fields in that class with that annotation. <code>@Getter</code>/<code>@Setter</code> annotations on fields take precedence over the ones on classes. </p><p> |