From 2725637ef7a54917094f3302ec8af4df4e4f41d5 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 17 Dec 2018 23:42:38 +0100 Subject: [website] updated docs of FieldNameConstants to show how to generate an enum instead of a static class. --- website/templates/features/experimental/FieldNameConstants.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/templates/features/experimental/FieldNameConstants.html b/website/templates/features/experimental/FieldNameConstants.html index 50faf804..1cbef32a 100644 --- a/website/templates/features/experimental/FieldNameConstants.html +++ b/website/templates/features/experimental/FieldNameConstants.html @@ -20,7 +20,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. @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.

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.

-- cgit