aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/BuilderComplex.java18
-rw-r--r--test/transform/resource/after-ecj/BuilderCustomName.java37
-rw-r--r--test/transform/resource/after-ecj/ValInLambda.java10
-rw-r--r--test/transform/resource/after-ecj/ValLambda.java20
-rw-r--r--test/transform/resource/after-ecj/ValWeirdTypes.java10
5 files changed, 79 insertions, 16 deletions
diff --git a/test/transform/resource/after-ecj/BuilderComplex.java b/test/transform/resource/after-ecj/BuilderComplex.java
index 93d70fe9..23dbf058 100644
--- a/test/transform/resource/after-ecj/BuilderComplex.java
+++ b/test/transform/resource/after-ecj/BuilderComplex.java
@@ -1,27 +1,27 @@
import java.util.List;
import lombok.Builder;
class BuilderComplex {
- public static @java.lang.SuppressWarnings("all") class VoidBuilder<T extends Number> {
+ public static @java.lang.SuppressWarnings("all") class TestVoidName<T extends Number> {
private @java.lang.SuppressWarnings("all") T number;
private @java.lang.SuppressWarnings("all") int arg2;
private @java.lang.SuppressWarnings("all") String arg3;
private @java.lang.SuppressWarnings("all") BuilderComplex selfRef;
- @java.lang.SuppressWarnings("all") VoidBuilder() {
+ @java.lang.SuppressWarnings("all") TestVoidName() {
super();
}
- public @java.lang.SuppressWarnings("all") VoidBuilder<T> number(final T number) {
+ public @java.lang.SuppressWarnings("all") TestVoidName<T> number(final T number) {
this.number = number;
return this;
}
- public @java.lang.SuppressWarnings("all") VoidBuilder<T> arg2(final int arg2) {
+ public @java.lang.SuppressWarnings("all") TestVoidName<T> arg2(final int arg2) {
this.arg2 = arg2;
return this;
}
- public @java.lang.SuppressWarnings("all") VoidBuilder<T> arg3(final String arg3) {
+ public @java.lang.SuppressWarnings("all") TestVoidName<T> arg3(final String arg3) {
this.arg3 = arg3;
return this;
}
- public @java.lang.SuppressWarnings("all") VoidBuilder<T> selfRef(final BuilderComplex selfRef) {
+ public @java.lang.SuppressWarnings("all") TestVoidName<T> selfRef(final BuilderComplex selfRef) {
this.selfRef = selfRef;
return this;
}
@@ -29,7 +29,7 @@ class BuilderComplex {
BuilderComplex.<T>testVoidWithGenerics(number, arg2, arg3, selfRef);
}
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
- return (((((((("BuilderComplex.VoidBuilder(number=" + this.number) + ", arg2=") + this.arg2) + ", arg3=") + this.arg3) + ", selfRef=") + this.selfRef) + ")");
+ return (((((((("BuilderComplex.TestVoidName(number=" + this.number) + ", arg2=") + this.arg2) + ", arg3=") + this.arg3) + ", selfRef=") + this.selfRef) + ")");
}
}
BuilderComplex() {
@@ -37,7 +37,7 @@ class BuilderComplex {
}
private static @Builder(buildMethodName = "execute") <T extends Number>void testVoidWithGenerics(T number, int arg2, String arg3, BuilderComplex selfRef) {
}
- public static @java.lang.SuppressWarnings("all") <T extends Number>VoidBuilder<T> builder() {
- return new VoidBuilder<T>();
+ public static @java.lang.SuppressWarnings("all") <T extends Number>TestVoidName<T> builder() {
+ return new TestVoidName<T>();
}
}
diff --git a/test/transform/resource/after-ecj/BuilderCustomName.java b/test/transform/resource/after-ecj/BuilderCustomName.java
new file mode 100644
index 00000000..1067a9d1
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderCustomName.java
@@ -0,0 +1,37 @@
+import java.util.List;
+@lombok.experimental.SuperBuilder class BuilderCustomName<T> {
+ public static abstract @java.lang.SuppressWarnings("all") class SimpleTestBuilder<T, C extends BuilderCustomName<T>, B extends SimpleTestBuilder<T, C, B>> {
+ private @java.lang.SuppressWarnings("all") int field;
+ public SimpleTestBuilder() {
+ super();
+ }
+ protected abstract @java.lang.SuppressWarnings("all") B self();
+ public abstract @java.lang.SuppressWarnings("all") C build();
+ public @java.lang.SuppressWarnings("all") B field(final int field) {
+ this.field = field;
+ return self();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("BuilderCustomName.SimpleTestBuilder(field=" + this.field) + ")");
+ }
+ }
+ private static final @java.lang.SuppressWarnings("all") class SimpleTestBuilderImpl<T> extends SimpleTestBuilder<T, BuilderCustomName<T>, SimpleTestBuilderImpl<T>> {
+ private SimpleTestBuilderImpl() {
+ super();
+ }
+ protected @java.lang.Override @java.lang.SuppressWarnings("all") SimpleTestBuilderImpl<T> self() {
+ return this;
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") BuilderCustomName<T> build() {
+ return new BuilderCustomName<T>(this);
+ }
+ }
+ private final int field;
+ protected @java.lang.SuppressWarnings("all") BuilderCustomName(final SimpleTestBuilder<T, ?, ?> b) {
+ super();
+ this.field = b.field;
+ }
+ public static @java.lang.SuppressWarnings("all") <T>SimpleTestBuilder<T, ?, ?> builder() {
+ return new SimpleTestBuilderImpl<T>();
+ }
+}
diff --git a/test/transform/resource/after-ecj/ValInLambda.java b/test/transform/resource/after-ecj/ValInLambda.java
index 7669789b..0fac61e9 100644
--- a/test/transform/resource/after-ecj/ValInLambda.java
+++ b/test/transform/resource/after-ecj/ValInLambda.java
@@ -1,9 +1,9 @@
-// version 8:
-
import lombok.val;
class ValInLambda {
Runnable foo = (Runnable) () -> {
final @val int i = 1;
+ final @lombok.val java.lang.Runnable foo = ((System.currentTimeMillis() > 0) ? (Runnable) () -> {
+} : System.out::println);
};
ValInLambda() {
super();
@@ -18,4 +18,10 @@ class ValInLambda {
final @val int i = 1;
};
}
+ public void easyLubLambda() {
+ Runnable foo = (Runnable) () -> {
+ final @lombok.val java.lang.Runnable fooInner = ((System.currentTimeMillis() > 0) ? (Runnable) () -> {
+} : System.out::println);
+};
+ }
}
diff --git a/test/transform/resource/after-ecj/ValLambda.java b/test/transform/resource/after-ecj/ValLambda.java
index 4bf3265b..5b52869f 100644
--- a/test/transform/resource/after-ecj/ValLambda.java
+++ b/test/transform/resource/after-ecj/ValLambda.java
@@ -1,4 +1,14 @@
class ValLambda {
+ static {
+ final @lombok.val java.lang.Runnable foo = ((System.currentTimeMillis() > 0) ? (Runnable) () -> {
+} : System.out::println);
+ }
+ {
+ final @lombok.val java.lang.Runnable foo = ((System.currentTimeMillis() > 0) ? (Runnable) () -> {
+} : System.out::println);
+ }
+ <clinit>() {
+ }
ValLambda() {
super();
}
@@ -7,13 +17,17 @@ class ValLambda {
};
}
public void easyIntersectionLambda() {
- final @lombok.val java.lang.Object foo = (Runnable & java.io.Serializable) () -> {
+ final @lombok.val java.lang.Runnable foo = (Runnable & java.io.Serializable) () -> {
};
- final @lombok.val java.lang.Object bar = (java.io.Serializable & Runnable) () -> {
+ final @lombok.val java.io.Serializable bar = (java.io.Serializable & Runnable) () -> {
};
}
public void easyLubLambda() {
final @lombok.val java.lang.Runnable foo = ((System.currentTimeMillis() > 0) ? (Runnable) () -> {
-} : (Runnable) System.out::println);
+} : System.out::println);
+ final @lombok.val java.lang.Runnable foo1 = ((System.currentTimeMillis() > 0) ? (Runnable) System.out::println : System.out::println);
+ final @lombok.val java.util.function.Function foo2 = ((System.currentTimeMillis() < 0) ? (java.util.function.Function) (<no type> r) -> "" : (<no type> r) -> System.currentTimeMillis());
+ java.util.function.Function foo3 = ((System.currentTimeMillis() < 0) ? (java.util.function.Function) (<no type> r) -> "" : (<no type> r) -> System.currentTimeMillis());
+ final @lombok.val java.util.function.Function<java.lang.String, java.lang.String> foo4 = ((System.currentTimeMillis() < 0) ? (java.util.function.Function<String, String>) (<no type> r) -> "" : (<no type> r) -> String.valueOf(System.currentTimeMillis()));
}
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/ValWeirdTypes.java b/test/transform/resource/after-ecj/ValWeirdTypes.java
index 9f448db9..e98b9753 100644
--- a/test/transform/resource/after-ecj/ValWeirdTypes.java
+++ b/test/transform/resource/after-ecj/ValWeirdTypes.java
@@ -63,8 +63,14 @@ public class ValWeirdTypes<Z> {
final @val int singleInt = copy[0];
}
public void arraysAsList() {
- final @val java.util.List<java.lang.Class<? extends java.lang.Object>> x = Arrays.asList(String.class, BigDecimal.class);
- for (final @val java.lang.Class<? extends java.lang.Object> y : x)
+ final @val java.util.List<java.lang.Class<? extends java.io.Serializable>> x = Arrays.asList(String.class, BigDecimal.class);
+ for (final @val java.lang.Class<? extends java.io.Serializable> y : x)
+ {
+ }
+ }
+ public @SuppressWarnings("all") void arraysAsList2() {
+ final @val java.util.List<java.lang.Class<? extends java.lang.Comparable>> x = Arrays.asList(String.class, BigDecimal.class, Comparable.class);
+ for (final @val java.lang.Class<? extends java.lang.Comparable> y : x)
{
}
}