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/BuilderDefaultsTargetTyping.java12
-rw-r--r--test/transform/resource/before/OnXJava7Style.java8
-rw-r--r--test/transform/resource/before/OnXJava7StyleOn8.java8
-rw-r--r--test/transform/resource/before/OnXJava8Style.java8
-rw-r--r--test/transform/resource/before/OnXJava8StyleOn7.java8
-rw-r--r--test/transform/resource/before/SuperBuilderSingularToBuilderGuava.java19
-rw-r--r--test/transform/resource/before/SuperBuilderWithDefaultsAndTargetTyping.java18
-rw-r--r--test/transform/resource/before/ToStringExplicitIncludeConf.java7
8 files changed, 88 insertions, 0 deletions
diff --git a/test/transform/resource/before/BuilderDefaultsTargetTyping.java b/test/transform/resource/before/BuilderDefaultsTargetTyping.java
new file mode 100644
index 00000000..2d098779
--- /dev/null
+++ b/test/transform/resource/before/BuilderDefaultsTargetTyping.java
@@ -0,0 +1,12 @@
+import java.util.Arrays;
+import lombok.Builder;
+
+@Builder
+public class BuilderDefaultsTargetTyping {
+ @Builder.Default
+ String foo = doSth(Arrays.asList(1), Arrays.asList('a'));
+
+ static String doSth(java.util.List<Integer> i, java.util.List<Character> c) {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/OnXJava7Style.java b/test/transform/resource/before/OnXJava7Style.java
index 6a3c35ff..c9a022d7 100644
--- a/test/transform/resource/before/OnXJava7Style.java
+++ b/test/transform/resource/before/OnXJava7Style.java
@@ -8,9 +8,17 @@ public class OnXJava7Style {
String stuff() default "";
}
+ @interface Array {
+ String[] value() default {};
+ }
+
@lombok.Getter(onMethod=@__(@Foo)) String a;
@lombok.Setter(onMethod=@__(@Foo())) String b;
@lombok.Setter(onParam=@__(@Foo("a"))) String c;
@lombok.Setter(onParam=@__(@Bar(stuff="b"))) String d;
@lombok.Getter(onMethod=@__({@Foo(value="c"), @Bar(stuff="d")})) String e;
+ @lombok.Getter(onMethod=@__(@Array)) String f;
+ @lombok.Getter(onMethod=@__(@Array())) String g;
+ @lombok.Getter(onMethod=@__(@Array({}))) String h;
+ @lombok.Getter(onMethod=@__(@Array({"a", "b"}))) String i;
}
diff --git a/test/transform/resource/before/OnXJava7StyleOn8.java b/test/transform/resource/before/OnXJava7StyleOn8.java
index 94865c97..bbf007c2 100644
--- a/test/transform/resource/before/OnXJava7StyleOn8.java
+++ b/test/transform/resource/before/OnXJava7StyleOn8.java
@@ -10,9 +10,17 @@ public class OnXJava7StyleOn8 {
String stuff() default "";
}
+ @interface Array {
+ String[] value() default {};
+ }
+
@lombok.Getter(onMethod=@__(@Foo)) String a;
@lombok.Setter(onMethod=@__(@Foo())) String b;
@lombok.Setter(onParam=@__(@Foo("a"))) String c;
@lombok.Setter(onParam=@__(@Bar(stuff="b"))) String d;
@lombok.Getter(onMethod=@__({@Foo(value="c"), @Bar(stuff="d")})) String e;
+ @lombok.Getter(onMethod=@__(@Array)) String f;
+ @lombok.Getter(onMethod=@__(@Array())) String g;
+ @lombok.Getter(onMethod=@__(@Array({}))) String h;
+ @lombok.Getter(onMethod=@__(@Array({"a", "b"}))) String i;
}
diff --git a/test/transform/resource/before/OnXJava8Style.java b/test/transform/resource/before/OnXJava8Style.java
index ffb91727..7e77e36e 100644
--- a/test/transform/resource/before/OnXJava8Style.java
+++ b/test/transform/resource/before/OnXJava8Style.java
@@ -8,9 +8,17 @@ public class OnXJava8Style {
String stuff() default "";
}
+ @interface Array {
+ String[] value() default {};
+ }
+
@lombok.Getter(onMethod_=@Foo) String a;
@lombok.Setter(onMethod_=@Foo()) String b;
@lombok.Setter(onParam_=@Foo("a")) String c;
@lombok.Setter(onParam_=@Bar(stuff="b")) String d;
@lombok.Getter(onMethod_={@Foo(value="c"), @Bar(stuff="d")}) String e;
+ @lombok.Getter(onMethod_=@Array) String f;
+ @lombok.Getter(onMethod_=@Array()) String g;
+ @lombok.Getter(onMethod_=@Array({})) String h;
+ @lombok.Getter(onMethod_=@Array({"a", "b"})) String i;
}
diff --git a/test/transform/resource/before/OnXJava8StyleOn7.java b/test/transform/resource/before/OnXJava8StyleOn7.java
index 98f76451..a702601c 100644
--- a/test/transform/resource/before/OnXJava8StyleOn7.java
+++ b/test/transform/resource/before/OnXJava8StyleOn7.java
@@ -10,9 +10,17 @@ public class OnXJava8StyleOn7 {
String stuff() default "";
}
+ @interface Array {
+ String[] value() default {};
+ }
+
@lombok.Getter(onMethod_=@Foo) String a;
@lombok.Setter(onMethod_=@Foo()) String b;
@lombok.Setter(onParam_=@Foo("a")) String c;
@lombok.Setter(onParam_=@Bar(stuff="b")) String d;
@lombok.Getter(onMethod_={@Foo(value="c"), @Bar(stuff="d")}) String e;
+ @lombok.Getter(onMethod_=@Array) String f;
+ @lombok.Getter(onMethod_=@Array()) String g;
+ @lombok.Getter(onMethod_=@Array({})) String h;
+ @lombok.Getter(onMethod_=@Array({"a", "b"})) String i;
}
diff --git a/test/transform/resource/before/SuperBuilderSingularToBuilderGuava.java b/test/transform/resource/before/SuperBuilderSingularToBuilderGuava.java
new file mode 100644
index 00000000..7e5b51f2
--- /dev/null
+++ b/test/transform/resource/before/SuperBuilderSingularToBuilderGuava.java
@@ -0,0 +1,19 @@
+public class SuperBuilderSingularToBuilderGuava {
+ @lombok.experimental.SuperBuilder(toBuilder=true)
+ public static class Parent<T> {
+ @lombok.Singular private com.google.common.collect.ImmutableList<T> cards;
+ @lombok.Singular private com.google.common.collect.ImmutableCollection<? extends Number> frogs;
+ @SuppressWarnings("all") @lombok.Singular("rawSet") private com.google.common.collect.ImmutableSet rawSet;
+ @lombok.Singular private com.google.common.collect.ImmutableSortedSet<String> passes;
+ @lombok.Singular private com.google.common.collect.ImmutableTable<? extends Number, ? extends Number, String> users;
+ }
+
+ @lombok.experimental.SuperBuilder(toBuilder=true)
+ public static class Child<T> extends Parent<T> {
+ private double field3;
+ }
+
+ public static void test() {
+ Child<Integer> x = Child.<Integer>builder().card(1).build().toBuilder().build();
+ }
+}
diff --git a/test/transform/resource/before/SuperBuilderWithDefaultsAndTargetTyping.java b/test/transform/resource/before/SuperBuilderWithDefaultsAndTargetTyping.java
new file mode 100644
index 00000000..996615b6
--- /dev/null
+++ b/test/transform/resource/before/SuperBuilderWithDefaultsAndTargetTyping.java
@@ -0,0 +1,18 @@
+import java.util.Arrays;
+import lombok.Builder;
+
+public class SuperBuilderWithDefaultsAndTargetTyping {
+ @lombok.experimental.SuperBuilder
+ public static class Parent {
+ @lombok.Builder.Default private String foo = doSth(Arrays.asList(1), Arrays.asList('a'));
+ }
+
+ @lombok.experimental.SuperBuilder
+ public static class Child extends Parent {
+ @lombok.Builder.Default private String foo = doSth(Arrays.asList(1), Arrays.asList('a'));
+ }
+
+ static String doSth(java.util.List<Integer> i, java.util.List<Character> c) {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/ToStringExplicitIncludeConf.java b/test/transform/resource/before/ToStringExplicitIncludeConf.java
new file mode 100644
index 00000000..ee49c754
--- /dev/null
+++ b/test/transform/resource/before/ToStringExplicitIncludeConf.java
@@ -0,0 +1,7 @@
+//CONF: lombok.toString.onlyExplicitlyIncluded = true
+
+@lombok.ToString
+class ToStringExplicitIncludeConf {
+ int x;
+ @lombok.ToString.Include int y;
+}