aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-09-04 01:53:07 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-09-04 01:54:49 +0200
commita39ef3ba0cae1fd6038c4407ec7e66f9bf0f5ea2 (patch)
treedc934ba79df1a2b071a3695779b8961e5fdea519 /test
parentaf55bd0a328aa05f3ffb53a57a37306d1372a478 (diff)
downloadlombok-a39ef3ba0cae1fd6038c4407ec7e66f9bf0f5ea2.tar.gz
lombok-a39ef3ba0cae1fd6038c4407ec7e66f9bf0f5ea2.tar.bz2
lombok-a39ef3ba0cae1fd6038c4407ec7e66f9bf0f5ea2.zip
[issue #1851] Lombok needs to generate type-use annotations when copying over types from, say, a field, to getter/setter/constructor/builder/wither/etc.
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/TypeUseAnnotations.java14
-rw-r--r--test/transform/resource/after-ecj/TypeUseAnnotations.java15
-rw-r--r--test/transform/resource/before/TypeUseAnnotations.java11
3 files changed, 40 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/TypeUseAnnotations.java b/test/transform/resource/after-delombok/TypeUseAnnotations.java
new file mode 100644
index 00000000..1e1536bf
--- /dev/null
+++ b/test/transform/resource/after-delombok/TypeUseAnnotations.java
@@ -0,0 +1,14 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@interface TA {
+ int x();
+}
+class TypeUseAnnotations {
+ List<@TA(x = 5) String> foo;
+ @java.lang.SuppressWarnings("all")
+ public List<@TA(x = 5) String> getFoo() {
+ return this.foo;
+ }
+}
diff --git a/test/transform/resource/after-ecj/TypeUseAnnotations.java b/test/transform/resource/after-ecj/TypeUseAnnotations.java
new file mode 100644
index 00000000..156643b9
--- /dev/null
+++ b/test/transform/resource/after-ecj/TypeUseAnnotations.java
@@ -0,0 +1,15 @@
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) @interface TA {
+ int x();
+}
+class TypeUseAnnotations {
+ @lombok.Getter List<@TA(x = 5) String> foo;
+ TypeUseAnnotations() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") List<@TA(x = 5) String> getFoo() {
+ return this.foo;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/TypeUseAnnotations.java b/test/transform/resource/before/TypeUseAnnotations.java
new file mode 100644
index 00000000..c09a291d
--- /dev/null
+++ b/test/transform/resource/before/TypeUseAnnotations.java
@@ -0,0 +1,11 @@
+//version 8:
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@interface TA {
+ int x();
+}
+class TypeUseAnnotations {
+ @lombok.Getter List<@TA(x=5) String> foo;
+}