aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-04-05 14:22:40 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-04-05 14:22:40 +0200
commitb6fb3c03fa35db3423ea4274f35d2c77859a3286 (patch)
tree4e34a00e9684baedba46fdf635e5382679c2188d /test/transform/resource
parent2c93d336c1d694a286b53710cbeaa01339ba3f1c (diff)
downloadlombok-b6fb3c03fa35db3423ea4274f35d2c77859a3286.tar.gz
lombok-b6fb3c03fa35db3423ea4274f35d2c77859a3286.tar.bz2
lombok-b6fb3c03fa35db3423ea4274f35d2c77859a3286.zip
[fieldNameConstants] code review, docs, tests, fixup.
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java1
-rw-r--r--test/transform/resource/after-delombok/FieldNameConstantsBasic.java8
-rw-r--r--test/transform/resource/after-delombok/FieldNameConstantsWeird.java4
-rw-r--r--test/transform/resource/after-delombok/InnerClass.java3
-rw-r--r--test/transform/resource/after-ecj/FieldNameConstantsBasic.java15
-rw-r--r--test/transform/resource/after-ecj/FieldNameConstantsWeird.java9
-rw-r--r--test/transform/resource/before/FieldNameConstantsBasic.java11
-rw-r--r--test/transform/resource/before/FieldNameConstantsWeird.java9
-rw-r--r--test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages1
-rw-r--r--test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages1
10 files changed, 61 insertions, 1 deletions
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java b/test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java
index 501d45a1..9eb3cdb3 100644
--- a/test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java
+++ b/test/transform/resource/after-delombok/EqualsAndHashCodeWithGenericsOnInners.java
@@ -1,3 +1,4 @@
+//version 7:
public class EqualsAndHashCodeWithGenericsOnInners<A> {
class Inner<B> {
int x;
diff --git a/test/transform/resource/after-delombok/FieldNameConstantsBasic.java b/test/transform/resource/after-delombok/FieldNameConstantsBasic.java
new file mode 100644
index 00000000..de5d68c6
--- /dev/null
+++ b/test/transform/resource/after-delombok/FieldNameConstantsBasic.java
@@ -0,0 +1,8 @@
+public class FieldNameConstantsBasic {
+ protected static final java.lang.String I_AM_A_DVD_PLAYER = "iAmADvdPlayer";
+ public static final java.lang.String BUT_PRINT_ME_PLEASE = "butPrintMePlease";
+ String iAmADvdPlayer;
+ int $skipMe;
+ static double skipMeToo;
+ String butPrintMePlease;
+}
diff --git a/test/transform/resource/after-delombok/FieldNameConstantsWeird.java b/test/transform/resource/after-delombok/FieldNameConstantsWeird.java
new file mode 100644
index 00000000..a256f5ba
--- /dev/null
+++ b/test/transform/resource/after-delombok/FieldNameConstantsWeird.java
@@ -0,0 +1,4 @@
+public class FieldNameConstantsWeird {
+ String iAmADvdPlayer;
+ String X;
+}
diff --git a/test/transform/resource/after-delombok/InnerClass.java b/test/transform/resource/after-delombok/InnerClass.java
index 6d42bb79..2e49b9ad 100644
--- a/test/transform/resource/after-delombok/InnerClass.java
+++ b/test/transform/resource/after-delombok/InnerClass.java
@@ -1,3 +1,4 @@
+//version 8:
class A {
class B {
String s;
@@ -48,4 +49,4 @@ class C {
return "C.D(a=" + this.getA() + ")";
}
}
-} \ No newline at end of file
+}
diff --git a/test/transform/resource/after-ecj/FieldNameConstantsBasic.java b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java
new file mode 100644
index 00000000..bfa339fb
--- /dev/null
+++ b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java
@@ -0,0 +1,15 @@
+import lombok.experimental.FieldNameConstants;
+import lombok.AccessLevel;
+public @FieldNameConstants class FieldNameConstantsBasic {
+ public static final java.lang.String BUT_PRINT_ME_PLEASE = "butPrintMePlease";
+ protected static final java.lang.String I_AM_A_DVD_PLAYER = "iAmADvdPlayer";
+ @FieldNameConstants(level = AccessLevel.PROTECTED) String iAmADvdPlayer;
+ int $skipMe;
+ static double skipMeToo;
+ String butPrintMePlease;
+ <clinit>() {
+ }
+ public FieldNameConstantsBasic() {
+ super();
+ }
+}
diff --git a/test/transform/resource/after-ecj/FieldNameConstantsWeird.java b/test/transform/resource/after-ecj/FieldNameConstantsWeird.java
new file mode 100644
index 00000000..c581b7ef
--- /dev/null
+++ b/test/transform/resource/after-ecj/FieldNameConstantsWeird.java
@@ -0,0 +1,9 @@
+import lombok.experimental.FieldNameConstants;
+import lombok.AccessLevel;
+public @FieldNameConstants class FieldNameConstantsWeird {
+ @FieldNameConstants(level = AccessLevel.NONE) String iAmADvdPlayer;
+ String X;
+ public FieldNameConstantsWeird() {
+ super();
+ }
+}
diff --git a/test/transform/resource/before/FieldNameConstantsBasic.java b/test/transform/resource/before/FieldNameConstantsBasic.java
new file mode 100644
index 00000000..1bc15d84
--- /dev/null
+++ b/test/transform/resource/before/FieldNameConstantsBasic.java
@@ -0,0 +1,11 @@
+import lombok.experimental.FieldNameConstants;
+import lombok.AccessLevel;
+
+@FieldNameConstants
+public class FieldNameConstantsBasic {
+ @FieldNameConstants(level = AccessLevel.PROTECTED)
+ String iAmADvdPlayer;
+ int $skipMe;
+ static double skipMeToo;
+ String butPrintMePlease;
+}
diff --git a/test/transform/resource/before/FieldNameConstantsWeird.java b/test/transform/resource/before/FieldNameConstantsWeird.java
new file mode 100644
index 00000000..0f99133d
--- /dev/null
+++ b/test/transform/resource/before/FieldNameConstantsWeird.java
@@ -0,0 +1,9 @@
+import lombok.experimental.FieldNameConstants;
+import lombok.AccessLevel;
+
+@FieldNameConstants
+public class FieldNameConstantsWeird {
+ @FieldNameConstants(level = AccessLevel.NONE)
+ String iAmADvdPlayer;
+ String X;
+}
diff --git a/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages b/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages
new file mode 100644
index 00000000..d5fc44f5
--- /dev/null
+++ b/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages
@@ -0,0 +1 @@
+8 Not generating constant for this field: The name of the constant would be equal to the name of this field.
diff --git a/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages b/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages
new file mode 100644
index 00000000..d5fc44f5
--- /dev/null
+++ b/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages
@@ -0,0 +1 @@
+8 Not generating constant for this field: The name of the constant would be equal to the name of this field.