diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-12-17 23:42:38 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-12-17 23:42:38 +0100 |
commit | 2725637ef7a54917094f3302ec8af4df4e4f41d5 (patch) | |
tree | 7d1b56b6a8eaa25c6d3cb45924f71c3847f74d19 /website | |
parent | b00c0b0bf9621201a7565abb87d34c70beaa6118 (diff) | |
download | lombok-2725637ef7a54917094f3302ec8af4df4e4f41d5.tar.gz lombok-2725637ef7a54917094f3302ec8af4df4e4f41d5.tar.bz2 lombok-2725637ef7a54917094f3302ec8af4df4e4f41d5.zip |
[website] updated docs of FieldNameConstants to show how to generate an enum instead of a static class.
Diffstat (limited to 'website')
-rw-r--r-- | website/templates/features/experimental/FieldNameConstants.html | 2 |
1 files changed, 1 insertions, 1 deletions
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> <p> - The <code>@FieldNameConstants</code> annotation generates an inner type which contains 1 constant for each field in your class; either string constants (fields marked <code>public static final</code>, of type <code>java.lang.String</code>) or if you prefer, an enum type with 1 value for each field. <code>@FieldNameConstants</code> 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 <code>@FieldNameConstants</code> annotation generates an inner type which contains 1 constant for each field in your class; either string constants (fields marked <code>public static final</code>, of type <code>java.lang.String</code>) or if you prefer, an enum type with 1 value for each field - write <code>@FieldNameConstants(asEnum = true)</code> for the enum variant. <code>@FieldNameConstants</code> 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. </p><p> The generated inner type is by default called <code>Fields</code> and is <code>public</code>. You can modify this via <code>@FieldNameConstants(innerTypeName = "FieldNames", access = AccessLevel.PACKAGE)</code> for example. The default inner type name can also be modified via configuration key <code>lombok.fieldNameConstants.innerTypeName</code>. The generated fields are always <code>public</code>. </p><p> |