aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-01 01:33:57 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-01 01:33:57 +0200
commitbf0499263b05e11fdd43886df3dc5663c8fee5f4 (patch)
tree6292ee0339692e5fee9c8231c11704ed39393606 /website
parentac0eeacc699aa1427fab3fbc5c57fd6d6b183473 (diff)
downloadlombok-bf0499263b05e11fdd43886df3dc5663c8fee5f4.tar.gz
lombok-bf0499263b05e11fdd43886df3dc5663c8fee5f4.tar.bz2
lombok-bf0499263b05e11fdd43886df3dc5663c8fee5f4.zip
[issue #2092] Add an uppercase option to FieldNameConstants
Diffstat (limited to 'website')
-rw-r--r--website/templates/features/experimental/FieldNameConstants.html8
1 files changed, 7 insertions, 1 deletions
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.
</p><p>
@FieldNameConstants was redesigned in lombok v1.18.4.
+ </p><p>
+ The <em>lombok.config</em> option <code>lombok.fieldNameConstants.uppercase = true</code> was added in lombok v1.18.8.
</p>
</@f.history>
@@ -20,7 +22,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 - 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.
+ 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, unless you set the <code>lombok.fieldNameConstants.uppercase = true</code> option in your <code>lombok.config</code> file; in that case lombok will try to <code>UPPER_CASE</code> the name.
</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>
@@ -39,6 +41,10 @@
<code>lombok.fieldNameConstants.innerTypeName</code> = <em>a string</em> (default: 'Fields')
</dt><dd>
The name of the inner type generated by lombok can be controlled with this configuration key.
+ </dd><dt>
+ <code>lombok.fieldNameConstants.uppercase</code> = [<code>true</code> | <code>false</code>] (default: false)
+ </dt><dd>
+ If <code>true</code>, attempt to uppercase the generated fields.
</dd>
</@f.confKeys>