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. --- .../before/FieldNameConstantsHandrolled.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test/transform/resource/before/FieldNameConstantsHandrolled.java (limited to 'test/transform/resource/before') diff --git a/test/transform/resource/before/FieldNameConstantsHandrolled.java b/test/transform/resource/before/FieldNameConstantsHandrolled.java new file mode 100644 index 00000000..b6765fb2 --- /dev/null +++ b/test/transform/resource/before/FieldNameConstantsHandrolled.java @@ -0,0 +1,33 @@ +import lombok.experimental.FieldNameConstants; +import lombok.AccessLevel; + +@FieldNameConstants(asEnum = true, innerTypeName = "TypeTest") +class FieldNameConstantsHandrolled1 { + int field1, alsoAField, thirdField; + + public enum TypeTest { + field1 + } +} + +@FieldNameConstants(asEnum = true, innerTypeName = "TypeTest") +class FieldNameConstantsHandrolled2 { + int field1, alsoAField, thirdField; + + public enum TypeTest { + field1; + + public String foo() { + return name(); + } + } +} + +@FieldNameConstants +class FieldNameConstantsHandrolled3 { + int field1, alsoAField, thirdField; + + static class Fields { + public static final int alsoAField = 5; + } +} -- cgit