diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-18 01:40:32 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-18 01:40:32 +0200 |
commit | aee4e76d864e01b5d453409e703ad54852fa57bb (patch) | |
tree | 98e00ec3d53c03a492d0c8b3d3af678167cbbddc /website/templates/features/GetterSetter.html | |
parent | 9198551defb7dd71d872c7b86af0a3f0bf0ec545 (diff) | |
download | lombok-aee4e76d864e01b5d453409e703ad54852fa57bb.tar.gz lombok-aee4e76d864e01b5d453409e703ad54852fa57bb.tar.bz2 lombok-aee4e76d864e01b5d453409e703ad54852fa57bb.zip |
updated docs to reflect change to copyable annotations
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> |