![]() ![]() The prefix and suffix (here, FIELD_, and the empty string) were configurable. In which case lombok will add all the enum constants / public static final fields you haven't written yourself.įrom lombok v1.16.22 to lombok v1.18.2, this feature generated constants inside the type directly the name of these fields would for example turn field exampleFieldName into public static final String FIELD_EXAMPLE_FIELD_NAME = "exampleFieldName". You can define the inner Fields enum/class yourself, Starting with lombok v1.18.6, lombok will silently skip generating anything that already exists. You can use in fields + = true), or for more fine-grained control. ![]() By default includes all non-transient, non-static fields. ![]() Must be applied to classes (or enums, though you'd rarely want to do that). The default inner type name can also be modified via configuration key. You can modify this via = "FieldNames", level = AccessLevel.PACKAGE) for example. The generated inner type is by default called Fields and is public. The constant field (whether enum value or string constant) always has the exact same name as the field, capitalization and all, unless you set the = true option in your nfig file in that case lombok will try to UPPER_CASE the name. is useful for various marshalling and serialization frameworks. The annotation generates an inner type which contains 1 constant for each field in your class either string constants (fields marked public static final, of type ) or if you prefer, an enum type with 1 value for each field - write = true) for the enum variant. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |