![]() If set to true, getters generated for boolean fields will use the get prefix instead of the default is prefix, and any generated code that calls getters, such as will also use get instead of is = (default: basic)Ĭontrols how tricky cases like uShaped (one lowercase letter followed by an upper/titlecase letter) are capitalized. An explicitly configured prefix parameter of an annotation takes precedence over this setting. For example, if m is one of the prefixes listed in this setting, then a field named mFoobar will result in a getter named getFoobar(), not getMFoobar(). Lombok will strip any matching field prefix from the name of a field in order to determine the name of the getter/setter to generate. Inherited prefixes from parent config files can be removed with the -= operator. ![]() This is a list property entries can be added with the += operator. An explicitly configured chain parameter of an annotation takes precedence over this setting. If set to true, generated getters and setters will not be prefixed with the bean-standard ' get, is or set instead, the methods will use the same name as the field (minus prefixes). If set to true, generated setters will return this (instead of void). Supported configuration keys: = (default: false) If you use sections, and stripping for that section is no longer done (move the or line into the section). A section is a line in your javadoc containing 2 or more dashes, then the text 'GETTER' or 'SETTER', followed by 2 or more dashes, and nothing else on the line. To do that, you create a 'section' named GETTER and/or SETTER. It is also possible to define unique text for each getter/setter. Moved means: Deleted from the field's javadoc. Normally, all text is copied, and is moved to the getter, whilst lines are moved to the setter. NEW in lombok v1.12.0: javadoc on the field will now be copied to generated getters and setters. For more details see the documentation on the onX feature. To put annotations on the generated method, you can use to put annotations on the only parameter of a generated setter method, you can use Be careful though! This is an experimental feature. This lets you override the behaviour of a or annotation on a class. You can always manually disable getter/setter generation for any field by using the special AccessLevel.NONE access level. ![]() In that case, it's as if you annotate all the non-static fields in that class with the annotation. You can also put a and/or annotation on a class. Legal access levels are PUBLIC, PROTECTED, PACKAGE, and PRIVATE. The generated getter/setter method will be public unless you explicitly specify an AccessLevel, as shown in the example below. A default setter is named setFoo if the field is called foo, returns void, and takes 1 parameter of the same type as the field. You can annotate any field with and/or to let lombok generate the default getter/setter automatically.Ī default getter simply returns the field, and is named getFoo if the field is called foo (or isFoo if the field's type is boolean). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |