aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-02-04 00:08:48 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-02-04 00:08:48 +0100
commit58a7914027e3373faa942aa4ce7df2d3ebfb9a20 (patch)
treecb0627b028f9753a7b4c94ec2373c07a4f3fd9f8 /test/transform/resource/before
parent74b38cd7d6806723145f6183273468996ea7dd57 (diff)
downloadlombok-58a7914027e3373faa942aa4ce7df2d3ebfb9a20.tar.gz
lombok-58a7914027e3373faa942aa4ce7df2d3ebfb9a20.tar.bz2
lombok-58a7914027e3373faa942aa4ce7df2d3ebfb9a20.zip
@UtilityClass handlers now more intelligent about inner types of implicitly static contexts (enums, interfaces, and annotation declarations). Also added tests to test for these.
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/UtilityClass.java17
-rw-r--r--test/transform/resource/before/UtilityClassErrors.java8
2 files changed, 25 insertions, 0 deletions
diff --git a/test/transform/resource/before/UtilityClass.java b/test/transform/resource/before/UtilityClass.java
index ccfa43e1..0f9875f0 100644
--- a/test/transform/resource/before/UtilityClass.java
+++ b/test/transform/resource/before/UtilityClass.java
@@ -10,6 +10,7 @@ class UtilityClass {
private String innerInnerMember;
}
}
+
class UtilityInner {
static class InnerInner {
@lombok.experimental.UtilityClass
@@ -17,4 +18,20 @@ class UtilityInner {
int member;
}
}
+
+ enum UtilityInsideEnum {
+ FOO, BAR;
+
+ @lombok.experimental.UtilityClass
+ class InsideEnum {
+ int member;
+ }
+ }
+
+ interface UtilityInsideInterface {
+ @lombok.experimental.UtilityClass
+ class InsideInterface {
+ int member;
+ }
+ }
}
diff --git a/test/transform/resource/before/UtilityClassErrors.java b/test/transform/resource/before/UtilityClassErrors.java
index 5f72274b..d750e2bd 100644
--- a/test/transform/resource/before/UtilityClassErrors.java
+++ b/test/transform/resource/before/UtilityClassErrors.java
@@ -11,4 +11,12 @@ class UtilityClassErrors1 {
}
@lombok.experimental.UtilityClass
enum UtilityClassErrors2 {
+}
+class UtilityClassErrors3 {
+ class NonStaticInner {
+ @lombok.experimental.UtilityClass
+ class ThisShouldFail {
+ private String member;
+ }
+ }
} \ No newline at end of file