aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/FieldNameConstantsHandrolled.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-11-01 16:38:25 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-11-01 16:38:25 +0100
commit2fd46a50b6125fd9f0e8177ffad5db8ee934fe34 (patch)
tree6662a3cb71b99b8c2b9fc058db8b735dc36145d0 /test/transform/resource/before/FieldNameConstantsHandrolled.java
parent21878e253e331f6ea340ae44bf824890185e1938 (diff)
downloadlombok-2fd46a50b6125fd9f0e8177ffad5db8ee934fe34.tar.gz
lombok-2fd46a50b6125fd9f0e8177ffad5db8ee934fe34.tar.bz2
lombok-2fd46a50b6125fd9f0e8177ffad5db8ee934fe34.zip
[feature] FieldNameConstants now works like Builder: Make whatever bits it does by hand and lombok fills in whatever is missing.
Diffstat (limited to 'test/transform/resource/before/FieldNameConstantsHandrolled.java')
-rw-r--r--test/transform/resource/before/FieldNameConstantsHandrolled.java33
1 files changed, 33 insertions, 0 deletions
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;
+ }
+}