From aee4e76d864e01b5d453409e703ad54852fa57bb Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 18 Sep 2018 01:40:32 +0200 Subject: updated docs to reflect change to copyable annotations --- website/templates/features/GetterSetter.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'website/templates/features/GetterSetter.html') 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 @@

Any variation on boolean will not result in using the is prefix instead of the get prefix; for example, returning java.lang.Boolean results in a get prefix, not an is prefix.

- Any annotations named @NonNull (case insensitive) on the field are interpreted as: This field must not ever hold null. Therefore, these annotations result in an explicit null check in the generated setter. Also, these annotations (as well as any annotation named @Nullable or @CheckForNull) are copied to setter parameter and getter method. + A number of annotations from popular libraries that indicate non-nullness, such as javax.annotation.Nonnull, if present on the field, result in an explicit null check in the generated setter. +

+ Various well-known annotations about nullability, such as org.eclipse.jdt.annotation.NonNull, 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 configuration key lombok.copyableAnnotations.

You can annotate a class with a @Getter or @Setter annotation. Doing so is equivalent to annotating all non-static fields in that class with that annotation. @Getter/@Setter annotations on fields take precedence over the ones on classes.

-- cgit