aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/BuilderSingularAnnotatedTypes.java14
-rw-r--r--test/transform/resource/before/BuilderTypeAnnos.java14
-rw-r--r--test/transform/resource/before/ConstructorsTypeAnnos.java14
-rw-r--r--test/transform/resource/before/GetterTypeAnnos.java15
-rw-r--r--test/transform/resource/before/SetterTypeAnnos.java15
-rw-r--r--test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java14
-rw-r--r--test/transform/resource/before/WitherTypeAnnos.java18
7 files changed, 104 insertions, 0 deletions
diff --git a/test/transform/resource/before/BuilderSingularAnnotatedTypes.java b/test/transform/resource/before/BuilderSingularAnnotatedTypes.java
new file mode 100644
index 00000000..d54fed8d
--- /dev/null
+++ b/test/transform/resource/before/BuilderSingularAnnotatedTypes.java
@@ -0,0 +1,14 @@
+//VERSION 8:
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.Set;
+import java.util.Map;
+import lombok.NonNull;
+import lombok.Singular;
+@Target(ElementType.TYPE_USE)
+@interface MyAnnotation {}
+@lombok.Builder
+class BuilderSingularAnnotatedTypes {
+ @Singular private Set<@MyAnnotation @NonNull String> foos;
+ @Singular private Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars;
+}
diff --git a/test/transform/resource/before/BuilderTypeAnnos.java b/test/transform/resource/before/BuilderTypeAnnos.java
new file mode 100644
index 00000000..6b7bc1d8
--- /dev/null
+++ b/test/transform/resource/before/BuilderTypeAnnos.java
@@ -0,0 +1,14 @@
+//CONF: lombok.copyableAnnotations += TA
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TA {
+}
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TB {
+}
+@lombok.Builder
+class BuilderTypeAnnos {
+ private @TA @TB List<String> foo;
+}
diff --git a/test/transform/resource/before/ConstructorsTypeAnnos.java b/test/transform/resource/before/ConstructorsTypeAnnos.java
new file mode 100644
index 00000000..d767f321
--- /dev/null
+++ b/test/transform/resource/before/ConstructorsTypeAnnos.java
@@ -0,0 +1,14 @@
+//CONF: lombok.copyableAnnotations += TA
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TA {
+}
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TB {
+}
+@lombok.AllArgsConstructor
+class ConstructorsTypeAnnos {
+ @TA @TB List<String> foo;
+}
diff --git a/test/transform/resource/before/GetterTypeAnnos.java b/test/transform/resource/before/GetterTypeAnnos.java
new file mode 100644
index 00000000..34177503
--- /dev/null
+++ b/test/transform/resource/before/GetterTypeAnnos.java
@@ -0,0 +1,15 @@
+//CONF: lombok.copyableAnnotations += TA
+import lombok.Getter;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TA {
+}
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TB {
+}
+class GetterTypeAnnos {
+ @Getter
+ @TA @TB List<String> foo;
+}
diff --git a/test/transform/resource/before/SetterTypeAnnos.java b/test/transform/resource/before/SetterTypeAnnos.java
new file mode 100644
index 00000000..8031136d
--- /dev/null
+++ b/test/transform/resource/before/SetterTypeAnnos.java
@@ -0,0 +1,15 @@
+//CONF: lombok.copyableAnnotations += TA
+import lombok.Setter;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TA {
+}
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TB {
+}
+class SetterTypeAnnos {
+ @Setter
+ @TA @TB List<String> foo;
+}
diff --git a/test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java
new file mode 100644
index 00000000..d26352d2
--- /dev/null
+++ b/test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java
@@ -0,0 +1,14 @@
+//VERSION 8:
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.Set;
+import java.util.Map;
+import lombok.NonNull;
+import lombok.Singular;
+@Target(ElementType.TYPE_USE)
+@interface MyAnnotation {}
+@lombok.experimental.SuperBuilder
+class SuperBuilderSingularAnnotatedTypes {
+ @Singular private Set<@MyAnnotation @NonNull String> foos;
+ @Singular private Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars;
+}
diff --git a/test/transform/resource/before/WitherTypeAnnos.java b/test/transform/resource/before/WitherTypeAnnos.java
new file mode 100644
index 00000000..97cd3d9f
--- /dev/null
+++ b/test/transform/resource/before/WitherTypeAnnos.java
@@ -0,0 +1,18 @@
+//CONF: lombok.copyableAnnotations += TA
+import lombok.experimental.Wither;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+import java.util.List;
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TA {
+}
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@interface TB {
+}
+class WitherTypeAnnos {
+ @Wither final @TA @TB List<String> foo;
+
+ WitherTypeAnnos(@TA @TB List<String> foo) {
+ this.foo = foo;
+ }
+}