Package lombok.experimental
Annotation Type Accessors
-
@Target({TYPE,FIELD}) @Retention(SOURCE) public @interface AccessorsA container for settings for the generation of getters and setters.Complete documentation is found at the project lombok features page for @Accessors.
Using this annotation does nothing by itself; an annotation that makes lombok generate getters and setters, such as
SetterorDatais also required.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanchainIf true, setters returnthisinstead ofvoid.booleanfluentIf true, accessors will be named after the field and not include agetorsetprefix.java.lang.String[]prefixIf present, only fields with any of the stated prefixes are given the getter/setter treatment.
-
-
-
Element Detail
-
fluent
boolean fluent
If true, accessors will be named after the field and not include agetorsetprefix. If true andchainis omitted,chaindefaults totrue. default: false- Returns:
- Whether or not to make fluent methods (named
fieldName(), not for examplesetFieldName).
- Default:
- false
-
-
-
prefix
java.lang.String[] prefix
If present, only fields with any of the stated prefixes are given the getter/setter treatment. Note that a prefix only counts if the next character is NOT a lowercase character or the last letter of the prefix is not a letter (for instance an underscore). If multiple fields all turn into the same name when the prefix is stripped, an error will be generated.- Returns:
- If you are in the habit of prefixing your fields (for example, you name them
fFieldName, specify such prefixes here).
- Default:
- {}
-
-