aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-06-04 23:34:25 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-06-04 23:36:10 +0200
commitb8e85f5dc7044e9a4bd43c41786bdda2a38f50ac (patch)
tree7b93ae4844e9d9cd64f3f8dcfd9a72f2407921d5 /test/transform/resource
parentfb5a5530148614e8d0c423077d9043e2d58f453b (diff)
downloadlombok-b8e85f5dc7044e9a4bd43c41786bdda2a38f50ac.tar.gz
lombok-b8e85f5dc7044e9a4bd43c41786bdda2a38f50ac.tar.bz2
lombok-b8e85f5dc7044e9a4bd43c41786bdda2a38f50ac.zip
FieldNameConstants now defaults to having a prefix ‘FIELD_’, which can be configured both on the annotation itself and via a config key. This totally breaks compatibility with the previous lombok release, but, hey, it’s in experimental and it’s been one week. This is better.
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/FieldNameConstantsBasic.java4
-rw-r--r--test/transform/resource/after-delombok/FieldNameConstantsConfigKeys.java4
-rw-r--r--test/transform/resource/after-delombok/FieldNameConstantsWeird.java2
-rw-r--r--test/transform/resource/after-ecj/FieldNameConstantsBasic.java4
-rw-r--r--test/transform/resource/after-ecj/FieldNameConstantsConfigKeys.java9
-rw-r--r--test/transform/resource/after-ecj/FieldNameConstantsWeird.java6
-rw-r--r--test/transform/resource/before/FieldNameConstantsConfigKeys.java7
-rw-r--r--test/transform/resource/before/FieldNameConstantsWeird.java3
-rw-r--r--test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages2
-rw-r--r--test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages2
10 files changed, 36 insertions, 7 deletions
diff --git a/test/transform/resource/after-delombok/FieldNameConstantsBasic.java b/test/transform/resource/after-delombok/FieldNameConstantsBasic.java
index de5d68c6..4e547aa5 100644
--- a/test/transform/resource/after-delombok/FieldNameConstantsBasic.java
+++ b/test/transform/resource/after-delombok/FieldNameConstantsBasic.java
@@ -1,6 +1,6 @@
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";
+ protected static final java.lang.String FIELD_I_AM_A_DVD_PLAYER = "iAmADvdPlayer";
+ public static final java.lang.String FIELD_BUT_PRINT_ME_PLEASE = "butPrintMePlease";
String iAmADvdPlayer;
int $skipMe;
static double skipMeToo;
diff --git a/test/transform/resource/after-delombok/FieldNameConstantsConfigKeys.java b/test/transform/resource/after-delombok/FieldNameConstantsConfigKeys.java
new file mode 100644
index 00000000..c71b9264
--- /dev/null
+++ b/test/transform/resource/after-delombok/FieldNameConstantsConfigKeys.java
@@ -0,0 +1,4 @@
+public class FieldNameConstantsConfigKeys {
+ public static final java.lang.String I_AM_A_DVD_PLAYER_SFX = "iAmADvdPlayer";
+ String iAmADvdPlayer;
+}
diff --git a/test/transform/resource/after-delombok/FieldNameConstantsWeird.java b/test/transform/resource/after-delombok/FieldNameConstantsWeird.java
index a256f5ba..6940f628 100644
--- a/test/transform/resource/after-delombok/FieldNameConstantsWeird.java
+++ b/test/transform/resource/after-delombok/FieldNameConstantsWeird.java
@@ -1,4 +1,6 @@
public class FieldNameConstantsWeird {
+ public static final java.lang.String FIELD_AZ = "A";
String iAmADvdPlayer;
String X;
+ String A;
}
diff --git a/test/transform/resource/after-ecj/FieldNameConstantsBasic.java b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java
index bfa339fb..f77203ba 100644
--- a/test/transform/resource/after-ecj/FieldNameConstantsBasic.java
+++ b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java
@@ -1,8 +1,8 @@
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";
+ public static final java.lang.String FIELD_BUT_PRINT_ME_PLEASE = "butPrintMePlease";
+ protected static final java.lang.String FIELD_I_AM_A_DVD_PLAYER = "iAmADvdPlayer";
@FieldNameConstants(level = AccessLevel.PROTECTED) String iAmADvdPlayer;
int $skipMe;
static double skipMeToo;
diff --git a/test/transform/resource/after-ecj/FieldNameConstantsConfigKeys.java b/test/transform/resource/after-ecj/FieldNameConstantsConfigKeys.java
new file mode 100644
index 00000000..44629ee5
--- /dev/null
+++ b/test/transform/resource/after-ecj/FieldNameConstantsConfigKeys.java
@@ -0,0 +1,9 @@
+public @lombok.experimental.FieldNameConstants class FieldNameConstantsConfigKeys {
+ public static final java.lang.String I_AM_A_DVD_PLAYER_SFX = "iAmADvdPlayer";
+ String iAmADvdPlayer;
+ <clinit>() {
+ }
+ public FieldNameConstantsConfigKeys() {
+ super();
+ }
+}
diff --git a/test/transform/resource/after-ecj/FieldNameConstantsWeird.java b/test/transform/resource/after-ecj/FieldNameConstantsWeird.java
index c581b7ef..9958f664 100644
--- a/test/transform/resource/after-ecj/FieldNameConstantsWeird.java
+++ b/test/transform/resource/after-ecj/FieldNameConstantsWeird.java
@@ -1,8 +1,12 @@
import lombok.experimental.FieldNameConstants;
import lombok.AccessLevel;
public @FieldNameConstants class FieldNameConstantsWeird {
+ public static final java.lang.String FIELD_AZ = "A";
@FieldNameConstants(level = AccessLevel.NONE) String iAmADvdPlayer;
- String X;
+ @FieldNameConstants(prefix = "") String X;
+ @FieldNameConstants(suffix = "Z") String A;
+ <clinit>() {
+ }
public FieldNameConstantsWeird() {
super();
}
diff --git a/test/transform/resource/before/FieldNameConstantsConfigKeys.java b/test/transform/resource/before/FieldNameConstantsConfigKeys.java
new file mode 100644
index 00000000..ab8e3091
--- /dev/null
+++ b/test/transform/resource/before/FieldNameConstantsConfigKeys.java
@@ -0,0 +1,7 @@
+//CONF: lombok.fieldNameConstants.prefix =
+//CONF: lombok.fieldNameConstants.suffix = _SFX
+
+@lombok.experimental.FieldNameConstants
+public class FieldNameConstantsConfigKeys {
+ String iAmADvdPlayer;
+}
diff --git a/test/transform/resource/before/FieldNameConstantsWeird.java b/test/transform/resource/before/FieldNameConstantsWeird.java
index 0f99133d..74ec299a 100644
--- a/test/transform/resource/before/FieldNameConstantsWeird.java
+++ b/test/transform/resource/before/FieldNameConstantsWeird.java
@@ -5,5 +5,8 @@ import lombok.AccessLevel;
public class FieldNameConstantsWeird {
@FieldNameConstants(level = AccessLevel.NONE)
String iAmADvdPlayer;
+ @FieldNameConstants(prefix = "")
String X;
+ @FieldNameConstants(suffix = "Z")
+ String A;
}
diff --git a/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages b/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages
index d5fc44f5..02a38d58 100644
--- a/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages
+++ b/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages
@@ -1 +1 @@
-8 Not generating constant for this field: The name of the constant would be equal to the name of this field.
+9 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
index d5fc44f5..02a38d58 100644
--- a/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages
+++ b/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages
@@ -1 +1 @@
-8 Not generating constant for this field: The name of the constant would be equal to the name of this field.
+9 Not generating constant for this field: The name of the constant would be equal to the name of this field.