From 3c47eb1299467f052f25581430d20bc3b2b83f4d Mon Sep 17 00:00:00 2001
From: Reinier Zwitserloot
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
+ annotations (as well as any annotation named @Nullable
or @CheckForNull
) are copied to setter parameter and getter method.
+
+ 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.
Using the AccessLevel.NONE
access level simply generates nothing. It's useful only in combination with
- @Data
.
+ @Data
or a class-wide @Getter
or @Setter
.