From 2fd46a50b6125fd9f0e8177ffad5db8ee934fe34 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 1 Nov 2018 16:38:25 +0100 Subject: [feature] FieldNameConstants now works like Builder: Make whatever bits it does by hand and lombok fills in whatever is missing. --- website/templates/features/experimental/FieldNameConstants.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'website/templates/features/experimental/FieldNameConstants.html') diff --git a/website/templates/features/experimental/FieldNameConstants.html b/website/templates/features/experimental/FieldNameConstants.html index a6fac99d..283ebe55 100644 --- a/website/templates/features/experimental/FieldNameConstants.html +++ b/website/templates/features/experimental/FieldNameConstants.html @@ -44,6 +44,9 @@ <@f.smallPrint>

+ Starting with lombok v1.18.5, lombok will silently skip generating anything that already exists. You can define the inner Fields enum/class yourself, + in which case lombok will add all the enum constants / public static final fields you haven't written yourself. +

From 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";. The prefix and suffix (here, FIELD_, and the empty string) were configurable. Starting with lombok v1.18.4 this feature has been redesigned into generating an inner type as described above.

Any parameters of lombok annotations that take strings need to be supplied actual string literals; you cannot have references to constants like those generated by @FieldNameConstants. If you'd like to use @FieldNameConstants to for example fill in the of and/or exclude parameters of @ToString and similar lombok annotations, use the @ToString.Include / @ToString.Exclude etc system instead; these are described at the feature pages for those features. -- cgit