aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/DelegateWithVarargs2.java12
-rw-r--r--test/transform/resource/after-delombok/ExtensionMethodAutoboxing.java20
-rw-r--r--test/transform/resource/after-delombok/ExtensionMethodFunctional.java28
-rw-r--r--test/transform/resource/after-delombok/ExtensionMethodVarargs.java19
-rw-r--r--test/transform/resource/after-delombok/GetterSetterJavadoc.java2
-rw-r--r--test/transform/resource/after-delombok/LoggerSlf4j.java5
-rw-r--r--test/transform/resource/after-ecj/BuilderJavadoc.java25
-rw-r--r--test/transform/resource/after-ecj/BuilderWithDeprecated.java4
-rw-r--r--test/transform/resource/after-ecj/DelegateWithVarargs2.java17
-rw-r--r--test/transform/resource/after-ecj/ExtensionMethodAutoboxing.java25
-rw-r--r--test/transform/resource/after-ecj/ExtensionMethodFunctional.java31
-rw-r--r--test/transform/resource/after-ecj/ExtensionMethodVarargs.java24
-rw-r--r--test/transform/resource/after-ecj/GetterDeprecated.java3
-rw-r--r--test/transform/resource/after-ecj/GetterSetterJavadoc.java48
-rw-r--r--test/transform/resource/after-ecj/LoggerSlf4j.java8
-rw-r--r--test/transform/resource/after-ecj/SetterAndWithMethodJavadoc.java18
-rw-r--r--test/transform/resource/after-ecj/SetterDeprecated.java3
-rw-r--r--test/transform/resource/after-ecj/WithMethodMarkedDeprecated.java4
-rw-r--r--test/transform/resource/before/DelegateWithVarargs2.java9
-rw-r--r--test/transform/resource/before/ExtensionMethodAutoboxing.java23
-rw-r--r--test/transform/resource/before/ExtensionMethodFunctional.java33
-rw-r--r--test/transform/resource/before/ExtensionMethodVarargs.java23
-rw-r--r--test/transform/resource/before/LoggerSlf4j.java4
-rw-r--r--test/transform/resource/messages-delombok/ExtensionMethodVarargs.java.messages1
-rw-r--r--test/transform/resource/messages-idempotent/ExtensionMethodVarargs.java.messages1
25 files changed, 372 insertions, 18 deletions
diff --git a/test/transform/resource/after-delombok/DelegateWithVarargs2.java b/test/transform/resource/after-delombok/DelegateWithVarargs2.java
new file mode 100644
index 00000000..a8ff6e3b
--- /dev/null
+++ b/test/transform/resource/after-delombok/DelegateWithVarargs2.java
@@ -0,0 +1,12 @@
+class DelegateWithVarargs2 {
+ private DelegateWithVarargs2.B bar;
+ public class B {
+ public void varargs(Object[]... keys) {
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public void varargs(final java.lang.Object[]... keys) {
+ this.bar.varargs(keys);
+ }
+}
+
diff --git a/test/transform/resource/after-delombok/ExtensionMethodAutoboxing.java b/test/transform/resource/after-delombok/ExtensionMethodAutoboxing.java
new file mode 100644
index 00000000..f274cabb
--- /dev/null
+++ b/test/transform/resource/after-delombok/ExtensionMethodAutoboxing.java
@@ -0,0 +1,20 @@
+class ExtensionMethodAutoboxing {
+ public void test() {
+ Long l1 = 1L;
+ long l2 = 1L;
+ Integer i1 = 1;
+ int i2 = 1;
+ String string = "test";
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l1, i1);
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l1, i2);
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l2, i1);
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l2, i2);
+ }
+
+
+ static class Extensions {
+ public static String boxing(String string, Long a, int b) {
+ return string + " " + a + " " + b;
+ }
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/ExtensionMethodFunctional.java b/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
new file mode 100644
index 00000000..bd301543
--- /dev/null
+++ b/test/transform/resource/after-delombok/ExtensionMethodFunctional.java
@@ -0,0 +1,28 @@
+import java.util.function.Function;
+import java.util.function.Consumer;
+
+class ExtensionMethodFunctional {
+ public void test() {
+ String test = "test";
+ test = ExtensionMethodFunctional.Extensions.map(test, s -> ExtensionMethodFunctional.Extensions.reverse(s));
+ ExtensionMethodFunctional.Extensions.consume(test, s -> System.out.println("1: " + s), s -> System.out.println("2: " + s));
+ ExtensionMethodFunctional.Extensions.consume(test, System.out::println, System.out::println);
+ }
+
+ static class Extensions {
+ public static <T, R> R map(T value, Function<T, R> mapper) {
+ return mapper.apply(value);
+ }
+
+ public static String reverse(String string) {
+ return new StringBuilder(string).reverse().toString();
+ }
+
+ @SafeVarargs
+ public static <T> void consume(T o, Consumer<T>... consumer) {
+ for (int i = 0; i < consumer.length; i++) {
+ consumer[i].accept(o);
+ }
+ }
+ }
+}
diff --git a/test/transform/resource/after-delombok/ExtensionMethodVarargs.java b/test/transform/resource/after-delombok/ExtensionMethodVarargs.java
new file mode 100644
index 00000000..237b73ef
--- /dev/null
+++ b/test/transform/resource/after-delombok/ExtensionMethodVarargs.java
@@ -0,0 +1,19 @@
+class ExtensionMethodVarargs {
+ public void test() {
+ Long l1 = 1L;
+ long l2 = 1L;
+ Integer i1 = 1;
+ int i2 = 1;
+ ExtensionMethodVarargs.Extensions.format("%d %d %d %d", l1, l2, i1, i2);
+ ExtensionMethodVarargs.Extensions.format("%d", l1);
+ ExtensionMethodVarargs.Extensions.format("", new Integer[] {1, 2});
+ ExtensionMethodVarargs.Extensions.format("", new Integer[] {1, 2}, new Integer[] {1, 2});
+ }
+
+
+ static class Extensions {
+ public static String format(String string, Object... params) {
+ return String.format(string, params);
+ }
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/GetterSetterJavadoc.java b/test/transform/resource/after-delombok/GetterSetterJavadoc.java
index ae662da7..78d120a4 100644
--- a/test/transform/resource/after-delombok/GetterSetterJavadoc.java
+++ b/test/transform/resource/after-delombok/GetterSetterJavadoc.java
@@ -115,7 +115,7 @@ class GetterSetterJavadoc4 {
/**
* Some text
*
- * @param fieldName Hello, World5
+ * @param fieldName Hello, World4
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
diff --git a/test/transform/resource/after-delombok/LoggerSlf4j.java b/test/transform/resource/after-delombok/LoggerSlf4j.java
index 70f11ae4..152c8708 100644
--- a/test/transform/resource/after-delombok/LoggerSlf4j.java
+++ b/test/transform/resource/after-delombok/LoggerSlf4j.java
@@ -29,8 +29,3 @@ class LoggerSlf4jWithTwoStaticFields {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jWithTwoStaticFields.TOPIC + LoggerSlf4jWithTwoStaticFields.TOPIC);
static final String TOPIC = "StaticField";
}
-
-class LoggerSlf4jWithTwoLiterals {
- @java.lang.SuppressWarnings("all")
- private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("A" + "B");
-} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/BuilderJavadoc.java b/test/transform/resource/after-ecj/BuilderJavadoc.java
index 445b5417..3afd3be2 100644
--- a/test/transform/resource/after-ecj/BuilderJavadoc.java
+++ b/test/transform/resource/after-ecj/BuilderJavadoc.java
@@ -16,10 +16,21 @@ import java.util.List;
@java.lang.SuppressWarnings("all") BuilderJavadocBuilder() {
super();
}
+ /**
+ * basic gets only a builder setter.
+ * @see #getsetwith
+ * @param tag is moved to the setter.
+ * @return {@code this}.
+ */
public @java.lang.SuppressWarnings("all") BuilderJavadoc.BuilderJavadocBuilder<T> basic(final int basic) {
this.basic = basic;
return this;
}
+ /**
+ * getsetwith gets a builder setter, an instance getter and setter, and a wither.
+ * @param tag is moved to the setters and wither.
+ * @return {@code this}.
+ */
public @java.lang.SuppressWarnings("all") BuilderJavadoc.BuilderJavadocBuilder<T> getsetwith(final int getsetwith) {
this.getsetwith = getsetwith;
return this;
@@ -45,12 +56,26 @@ import java.util.List;
public static @java.lang.SuppressWarnings("all") <T>BuilderJavadoc.BuilderJavadocBuilder<T> builder() {
return new BuilderJavadoc.BuilderJavadocBuilder<T>();
}
+ /**
+ * getsetwith gets a builder setter, an instance getter and setter, and a wither.
+ *
+ * @return tag is moved to the getter.
+ */
public @java.lang.SuppressWarnings("all") int getGetsetwith() {
return this.getsetwith;
}
+ /**
+ * getsetwith gets a builder setter, an instance getter and setter, and a wither.
+ * @param tag is moved to the setters and wither.
+ */
public @java.lang.SuppressWarnings("all") void setGetsetwith(final int getsetwith) {
this.getsetwith = getsetwith;
}
+ /**
+ * getsetwith gets a builder setter, an instance getter and setter, and a wither.
+ * @param tag is moved to the setters and wither.
+ * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
+ */
public @java.lang.SuppressWarnings("all") BuilderJavadoc<T> withGetsetwith(final int getsetwith) {
return ((this.getsetwith == getsetwith) ? this : new BuilderJavadoc<T>(this.basic, getsetwith, this.predef, this.predefWithJavadoc));
}
diff --git a/test/transform/resource/after-ecj/BuilderWithDeprecated.java b/test/transform/resource/after-ecj/BuilderWithDeprecated.java
index 724a25e6..65326a66 100644
--- a/test/transform/resource/after-ecj/BuilderWithDeprecated.java
+++ b/test/transform/resource/after-ecj/BuilderWithDeprecated.java
@@ -10,6 +10,10 @@ public @Builder class BuilderWithDeprecated {
@java.lang.SuppressWarnings("all") BuilderWithDeprecatedBuilder() {
super();
}
+ /**
+ * @deprecated since always
+ * @return {@code this}.
+ */
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") BuilderWithDeprecated.BuilderWithDeprecatedBuilder dep1(final String dep1) {
this.dep1 = dep1;
return this;
diff --git a/test/transform/resource/after-ecj/DelegateWithVarargs2.java b/test/transform/resource/after-ecj/DelegateWithVarargs2.java
new file mode 100644
index 00000000..ed0cddf5
--- /dev/null
+++ b/test/transform/resource/after-ecj/DelegateWithVarargs2.java
@@ -0,0 +1,17 @@
+import lombok.experimental.Delegate;
+class DelegateWithVarargs2 {
+ public class B {
+ public B() {
+ super();
+ }
+ public void varargs(Object[]... keys) {
+ }
+ }
+ private @Delegate DelegateWithVarargs2.B bar;
+ DelegateWithVarargs2() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") void varargs(final java.lang.Object[]... keys) {
+ this.bar.varargs(keys);
+ }
+}
diff --git a/test/transform/resource/after-ecj/ExtensionMethodAutoboxing.java b/test/transform/resource/after-ecj/ExtensionMethodAutoboxing.java
new file mode 100644
index 00000000..8bc2b30f
--- /dev/null
+++ b/test/transform/resource/after-ecj/ExtensionMethodAutoboxing.java
@@ -0,0 +1,25 @@
+import lombok.experimental.ExtensionMethod;
+@ExtensionMethod({ExtensionMethodAutoboxing.Extensions.class}) class ExtensionMethodAutoboxing {
+ static class Extensions {
+ Extensions() {
+ super();
+ }
+ public static String boxing(String string, Long a, int b) {
+ return ((((string + " ") + a) + " ") + b);
+ }
+ }
+ ExtensionMethodAutoboxing() {
+ super();
+ }
+ public void test() {
+ Long l1 = 1l;
+ long l2 = 1l;
+ Integer i1 = 1;
+ int i2 = 1;
+ String string = "test";
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l1, i1);
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l1, i2);
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l2, i1);
+ ExtensionMethodAutoboxing.Extensions.boxing(string, l2, i2);
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/ExtensionMethodFunctional.java b/test/transform/resource/after-ecj/ExtensionMethodFunctional.java
new file mode 100644
index 00000000..0190eabb
--- /dev/null
+++ b/test/transform/resource/after-ecj/ExtensionMethodFunctional.java
@@ -0,0 +1,31 @@
+import java.util.function.Function;
+import java.util.function.Consumer;
+import lombok.experimental.ExtensionMethod;
+@ExtensionMethod(ExtensionMethodFunctional.Extensions.class) class ExtensionMethodFunctional {
+ static class Extensions {
+ Extensions() {
+ super();
+ }
+ public static <T, R>R map(T value, Function<T, R> mapper) {
+ return mapper.apply(value);
+ }
+ public static String reverse(String string) {
+ return new StringBuilder(string).reverse().toString();
+ }
+ public static @SafeVarargs <T>void consume(T o, Consumer<T>... consumer) {
+ for (int i = 0;; (i < consumer.length); i ++)
+ {
+ consumer[i].accept(o);
+ }
+ }
+ }
+ ExtensionMethodFunctional() {
+ super();
+ }
+ public void test() {
+ String test = "test";
+ test = ExtensionMethodFunctional.Extensions.map(test, (<no type> s) -> ExtensionMethodFunctional.Extensions.reverse(s));
+ ExtensionMethodFunctional.Extensions.consume(test, (<no type> s) -> System.out.println(("1: " + s)), (<no type> s) -> System.out.println(("2: " + s)));
+ ExtensionMethodFunctional.Extensions.consume(test, System.out::println, System.out::println);
+ }
+}
diff --git a/test/transform/resource/after-ecj/ExtensionMethodVarargs.java b/test/transform/resource/after-ecj/ExtensionMethodVarargs.java
new file mode 100644
index 00000000..727b6494
--- /dev/null
+++ b/test/transform/resource/after-ecj/ExtensionMethodVarargs.java
@@ -0,0 +1,24 @@
+import lombok.experimental.ExtensionMethod;
+@ExtensionMethod(ExtensionMethodVarargs.Extensions.class) class ExtensionMethodVarargs {
+ static class Extensions {
+ Extensions() {
+ super();
+ }
+ public static String format(String string, Object... params) {
+ return String.format(string, params);
+ }
+ }
+ ExtensionMethodVarargs() {
+ super();
+ }
+ public void test() {
+ Long l1 = 1l;
+ long l2 = 1l;
+ Integer i1 = 1;
+ int i2 = 1;
+ ExtensionMethodVarargs.Extensions.format("%d %d %d %d", l1, l2, i1, i2);
+ ExtensionMethodVarargs.Extensions.format("%d", l1);
+ ExtensionMethodVarargs.Extensions.format("", new Integer[]{1, 2});
+ ExtensionMethodVarargs.Extensions.format("", new Integer[]{1, 2}, new Integer[]{1, 2});
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/GetterDeprecated.java b/test/transform/resource/after-ecj/GetterDeprecated.java
index 546f7fb7..087a60b8 100644
--- a/test/transform/resource/after-ecj/GetterDeprecated.java
+++ b/test/transform/resource/after-ecj/GetterDeprecated.java
@@ -8,6 +8,9 @@ class GetterDeprecated {
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") int getAnnotation() {
return this.annotation;
}
+ /**
+ * @deprecated
+ */
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") int getJavadoc() {
return this.javadoc;
}
diff --git a/test/transform/resource/after-ecj/GetterSetterJavadoc.java b/test/transform/resource/after-ecj/GetterSetterJavadoc.java
index 4923fd02..c3308c51 100644
--- a/test/transform/resource/after-ecj/GetterSetterJavadoc.java
+++ b/test/transform/resource/after-ecj/GetterSetterJavadoc.java
@@ -1,8 +1,18 @@
@lombok.Data class GetterSetterJavadoc1 {
private int fieldName;
+ /**
+ * Getter section
+ *
+ * @return Sky is blue1
+ */
public @java.lang.SuppressWarnings("all") int getFieldName() {
return this.fieldName;
}
+ /**
+ * Some text
+ *
+ * @param fieldName Hello, World1
+ */
public @java.lang.SuppressWarnings("all") void setFieldName(final int fieldName) {
this.fieldName = fieldName;
}
@@ -39,9 +49,19 @@ class GetterSetterJavadoc2 {
GetterSetterJavadoc2() {
super();
}
+ /**
+ * Some text
+ *
+ * @return Sky is blue2
+ */
public @java.lang.SuppressWarnings("all") int getFieldName() {
return this.fieldName;
}
+ /**
+ * Some text
+ *
+ * @param fieldName Hello, World2
+ */
public @java.lang.SuppressWarnings("all") void setFieldName(final int fieldName) {
this.fieldName = fieldName;
}
@@ -51,9 +71,17 @@ class GetterSetterJavadoc3 {
GetterSetterJavadoc3() {
super();
}
+ /**
+ * Getter section
+ * @return Sky is blue3
+ */
public @java.lang.SuppressWarnings("all") int getFieldName() {
return this.fieldName;
}
+ /**
+ * Setter section
+ * @param fieldName Hello, World3
+ */
public @java.lang.SuppressWarnings("all") void setFieldName(final int fieldName) {
this.fieldName = fieldName;
}
@@ -63,9 +91,20 @@ class GetterSetterJavadoc3 {
GetterSetterJavadoc4() {
super();
}
+ /**
+ * Some text
+ *
+ * @return Sky is blue4
+ */
public @java.lang.SuppressWarnings("all") int fieldName() {
return this.fieldName;
}
+ /**
+ * Some text
+ *
+ * @param fieldName Hello, World4
+ * @return {@code this}.
+ */
public @java.lang.SuppressWarnings("all") GetterSetterJavadoc4 fieldName(final int fieldName) {
this.fieldName = fieldName;
return this;
@@ -76,9 +115,18 @@ class GetterSetterJavadoc3 {
GetterSetterJavadoc5() {
super();
}
+ /**
+ * Getter section
+ * @return Sky is blue5
+ */
public @java.lang.SuppressWarnings("all") int fieldName() {
return this.fieldName;
}
+ /**
+ * Setter section
+ * @param fieldName Hello, World5
+ * @return Sky is blue5
+ */
public @java.lang.SuppressWarnings("all") GetterSetterJavadoc5 fieldName(final int fieldName) {
this.fieldName = fieldName;
return this;
diff --git a/test/transform/resource/after-ecj/LoggerSlf4j.java b/test/transform/resource/after-ecj/LoggerSlf4j.java
index c303a895..286d023b 100644
--- a/test/transform/resource/after-ecj/LoggerSlf4j.java
+++ b/test/transform/resource/after-ecj/LoggerSlf4j.java
@@ -56,11 +56,3 @@ class LoggerSlf4jOuter {
super();
}
}
-@Slf4j(topic = ExtendedStringLiteral{AB}) class LoggerSlf4jWithTwoLiterals {
- private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("AB");
- <clinit>() {
- }
- LoggerSlf4jWithTwoLiterals() {
- super();
- }
-} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/SetterAndWithMethodJavadoc.java b/test/transform/resource/after-ecj/SetterAndWithMethodJavadoc.java
index dd64e358..c95b7bab 100644
--- a/test/transform/resource/after-ecj/SetterAndWithMethodJavadoc.java
+++ b/test/transform/resource/after-ecj/SetterAndWithMethodJavadoc.java
@@ -7,15 +7,33 @@ class SetterAndWithMethodJavadoc {
this.i = i;
this.j = j;
}
+ /**
+ * Some value.
+ * @param the new value
+ */
public @java.lang.SuppressWarnings("all") void setI(final int i) {
this.i = i;
}
+ /**
+ * Some value.
+ * @param the new value
+ * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
+ */
public @java.lang.SuppressWarnings("all") SetterAndWithMethodJavadoc withI(final int i) {
return ((this.i == i) ? this : new SetterAndWithMethodJavadoc(i, this.j));
}
+ /**
+ * Set some other value.
+ * @param the new other value
+ */
public @java.lang.SuppressWarnings("all") void setJ(final int j) {
this.j = j;
}
+ /**
+ * Reinstantiate with some other value.
+ * @param the other new other value
+ * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
+ */
public @java.lang.SuppressWarnings("all") SetterAndWithMethodJavadoc withJ(final int j) {
return ((this.j == j) ? this : new SetterAndWithMethodJavadoc(this.i, j));
}
diff --git a/test/transform/resource/after-ecj/SetterDeprecated.java b/test/transform/resource/after-ecj/SetterDeprecated.java
index d76612b7..cc089566 100644
--- a/test/transform/resource/after-ecj/SetterDeprecated.java
+++ b/test/transform/resource/after-ecj/SetterDeprecated.java
@@ -8,6 +8,9 @@ class SetterDeprecated {
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void setAnnotation(final int annotation) {
this.annotation = annotation;
}
+ /**
+ * @deprecated
+ */
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void setJavadoc(final int javadoc) {
this.javadoc = javadoc;
}
diff --git a/test/transform/resource/after-ecj/WithMethodMarkedDeprecated.java b/test/transform/resource/after-ecj/WithMethodMarkedDeprecated.java
index cd123fe8..4220308c 100644
--- a/test/transform/resource/after-ecj/WithMethodMarkedDeprecated.java
+++ b/test/transform/resource/after-ecj/WithMethodMarkedDeprecated.java
@@ -8,6 +8,10 @@ class WithMethodMarkedDeprecated {
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WithMethodMarkedDeprecated withAnnotation(final int annotation) {
return ((this.annotation == annotation) ? this : new WithMethodMarkedDeprecated(annotation, this.javadoc));
}
+ /**
+ * @deprecated
+ * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
+ */
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WithMethodMarkedDeprecated withJavadoc(final int javadoc) {
return ((this.javadoc == javadoc) ? this : new WithMethodMarkedDeprecated(this.annotation, javadoc));
}
diff --git a/test/transform/resource/before/DelegateWithVarargs2.java b/test/transform/resource/before/DelegateWithVarargs2.java
new file mode 100644
index 00000000..8a3dbf14
--- /dev/null
+++ b/test/transform/resource/before/DelegateWithVarargs2.java
@@ -0,0 +1,9 @@
+import lombok.experimental.Delegate;
+
+class DelegateWithVarargs2 {
+ @Delegate private DelegateWithVarargs2.B bar;
+
+ public class B {
+ public void varargs(Object[]... keys) {}
+ }
+}
diff --git a/test/transform/resource/before/ExtensionMethodAutoboxing.java b/test/transform/resource/before/ExtensionMethodAutoboxing.java
new file mode 100644
index 00000000..5e07a6b3
--- /dev/null
+++ b/test/transform/resource/before/ExtensionMethodAutoboxing.java
@@ -0,0 +1,23 @@
+import lombok.experimental.ExtensionMethod;
+
+@ExtensionMethod({ExtensionMethodAutoboxing.Extensions.class})
+class ExtensionMethodAutoboxing {
+ public void test() {
+ Long l1 = 1l;
+ long l2 = 1l;
+ Integer i1 = 1;
+ int i2 = 1;
+
+ String string = "test";
+ string.boxing(l1, i1);
+ string.boxing(l1, i2);
+ string.boxing(l2, i1);
+ string.boxing(l2, i2);
+ }
+
+ static class Extensions {
+ public static String boxing(String string, Long a, int b) {
+ return string + " " + a + " " + b;
+ }
+ }
+}
diff --git a/test/transform/resource/before/ExtensionMethodFunctional.java b/test/transform/resource/before/ExtensionMethodFunctional.java
new file mode 100644
index 00000000..19983258
--- /dev/null
+++ b/test/transform/resource/before/ExtensionMethodFunctional.java
@@ -0,0 +1,33 @@
+// version 8:
+import java.util.function.Function;
+import java.util.function.Consumer;
+
+import lombok.experimental.ExtensionMethod;
+
+@ExtensionMethod(ExtensionMethodFunctional.Extensions.class)
+class ExtensionMethodFunctional {
+ public void test() {
+ String test = "test";
+ test = test.map(s -> s.reverse());
+
+ test.consume(s -> System.out.println("1: " + s), s -> System.out.println("2: " + s));
+ test.consume(System.out::println, System.out::println);
+ }
+
+ static class Extensions {
+ public static <T, R> R map(T value, Function<T, R> mapper) {
+ return mapper.apply(value);
+ }
+
+ public static String reverse(String string) {
+ return new StringBuilder(string).reverse().toString();
+ }
+
+ @SafeVarargs
+ public static <T> void consume(T o, Consumer<T>... consumer) {
+ for (int i = 0; i < consumer.length; i++) {
+ consumer[i].accept(o);
+ }
+ }
+ }
+}
diff --git a/test/transform/resource/before/ExtensionMethodVarargs.java b/test/transform/resource/before/ExtensionMethodVarargs.java
new file mode 100644
index 00000000..a976f9e6
--- /dev/null
+++ b/test/transform/resource/before/ExtensionMethodVarargs.java
@@ -0,0 +1,23 @@
+// version 8:
+import lombok.experimental.ExtensionMethod;
+
+@ExtensionMethod(ExtensionMethodVarargs.Extensions.class)
+class ExtensionMethodVarargs {
+ public void test() {
+ Long l1 = 1l;
+ long l2 = 1l;
+ Integer i1 = 1;
+ int i2 = 1;
+
+ "%d %d %d %d".format(l1, l2, i1, i2);
+ "%d".format(l1);
+ "".format(new Integer[]{1,2});
+ "".format(new Integer[]{1,2}, new Integer[]{1,2});
+ }
+
+ static class Extensions {
+ public static String format(String string, Object... params) {
+ return String.format(string, params);
+ }
+ }
+}
diff --git a/test/transform/resource/before/LoggerSlf4j.java b/test/transform/resource/before/LoggerSlf4j.java
index 3f8284e8..c59db4ee 100644
--- a/test/transform/resource/before/LoggerSlf4j.java
+++ b/test/transform/resource/before/LoggerSlf4j.java
@@ -28,7 +28,3 @@ class LoggerSlf4jWithStaticField {
class LoggerSlf4jWithTwoStaticFields {
static final String TOPIC = "StaticField";
}
-
-@Slf4j(topic="A"+"B")
-class LoggerSlf4jWithTwoLiterals {
-} \ No newline at end of file
diff --git a/test/transform/resource/messages-delombok/ExtensionMethodVarargs.java.messages b/test/transform/resource/messages-delombok/ExtensionMethodVarargs.java.messages
new file mode 100644
index 00000000..587d0767
--- /dev/null
+++ b/test/transform/resource/messages-delombok/ExtensionMethodVarargs.java.messages
@@ -0,0 +1 @@
+14 non-varargs call of varargs method with inexact argument type for last parameter \ No newline at end of file
diff --git a/test/transform/resource/messages-idempotent/ExtensionMethodVarargs.java.messages b/test/transform/resource/messages-idempotent/ExtensionMethodVarargs.java.messages
new file mode 100644
index 00000000..5a1016ca
--- /dev/null
+++ b/test/transform/resource/messages-idempotent/ExtensionMethodVarargs.java.messages
@@ -0,0 +1 @@
+9 non-varargs call of varargs method with inexact argument type for last parameter \ No newline at end of file