From bf0499263b05e11fdd43886df3dc5663c8fee5f4 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 1 May 2019 01:33:57 +0200 Subject: [issue #2092] Add an uppercase option to FieldNameConstants --- website/templates/features/experimental/FieldNameConstants.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'website/templates/features') diff --git a/website/templates/features/experimental/FieldNameConstants.html b/website/templates/features/experimental/FieldNameConstants.html index 1cbef32a..e88b7670 100644 --- a/website/templates/features/experimental/FieldNameConstants.html +++ b/website/templates/features/experimental/FieldNameConstants.html @@ -6,6 +6,8 @@ @FieldNameConstants was introduced as experimental feature in lombok v1.16.22.

@FieldNameConstants was redesigned in lombok v1.18.4. +

+ The lombok.config option lombok.fieldNameConstants.uppercase = true was added in lombok v1.18.8.

@@ -20,7 +22,7 @@ <@f.overview>

- The @FieldNameConstants 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 java.lang.String) or if you prefer, an enum type with 1 value for each field - write @FieldNameConstants(asEnum = true) for the enum variant. @FieldNameConstants is useful for various marshalling and serialization frameworks. The constant field (whether enum value or string constant) always has the exact same name as the field, capitalization and all. + The @FieldNameConstants 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 java.lang.String) or if you prefer, an enum type with 1 value for each field - write @FieldNameConstants(asEnum = true) for the enum variant. @FieldNameConstants is useful for various marshalling and serialization frameworks. 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 lombok.fieldNameConstants.uppercase = true option in your lombok.config file; in that case lombok will try to UPPER_CASE the name.

The generated inner type is by default called Fields and is public. You can modify this via @FieldNameConstants(innerTypeName = "FieldNames", access = AccessLevel.PACKAGE) for example. The default inner type name can also be modified via configuration key lombok.fieldNameConstants.innerTypeName. The generated fields are always public.

@@ -39,6 +41,10 @@ lombok.fieldNameConstants.innerTypeName = a string (default: 'Fields')

The name of the inner type generated by lombok can be controlled with this configuration key. +
+ lombok.fieldNameConstants.uppercase = [true | false] (default: false) +
+ If true, attempt to uppercase the generated fields.
-- cgit