diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-06-04 23:34:25 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-06-04 23:36:10 +0200 |
commit | b8e85f5dc7044e9a4bd43c41786bdda2a38f50ac (patch) | |
tree | 7b93ae4844e9d9cd64f3f8dcfd9a72f2407921d5 /test/transform/resource/after-ecj | |
parent | fb5a5530148614e8d0c423077d9043e2d58f453b (diff) | |
download | lombok-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/after-ecj')
3 files changed, 16 insertions, 3 deletions
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(); } |