aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/SuperBuilderCustomized.java15
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderCustomized.java8
-rw-r--r--test/transform/resource/before/SuperBuilderCustomized.java10
3 files changed, 22 insertions, 11 deletions
diff --git a/test/transform/resource/after-delombok/SuperBuilderCustomized.java b/test/transform/resource/after-delombok/SuperBuilderCustomized.java
index bffa72fa..f66133c9 100644
--- a/test/transform/resource/after-delombok/SuperBuilderCustomized.java
+++ b/test/transform/resource/after-delombok/SuperBuilderCustomized.java
@@ -23,6 +23,13 @@ public class SuperBuilderCustomized {
}
}
int field1;
+ protected Parent(ParentBuilder<?, ?> b) {
+ if (b.field1 == 0) throw new IllegalArgumentException("field1 must be != 0");
+ this.field1 = b.field1;
+ }
+ public static SuperBuilderCustomized.Parent.ParentBuilder<?, ?> builder(int field1) {
+ return new SuperBuilderCustomized.Parent.ParentBuilderImpl().field1(field1);
+ }
@java.lang.SuppressWarnings("all")
private static final class ParentBuilderImpl extends SuperBuilderCustomized.Parent.ParentBuilder<SuperBuilderCustomized.Parent, SuperBuilderCustomized.Parent.ParentBuilderImpl> {
@java.lang.SuppressWarnings("all")
@@ -39,14 +46,6 @@ public class SuperBuilderCustomized {
return new SuperBuilderCustomized.Parent(this);
}
}
- @java.lang.SuppressWarnings("all")
- protected Parent(final SuperBuilderCustomized.Parent.ParentBuilder<?, ?> b) {
- this.field1 = b.field1;
- }
- @java.lang.SuppressWarnings("all")
- public static SuperBuilderCustomized.Parent.ParentBuilder<?, ?> builder() {
- return new SuperBuilderCustomized.Parent.ParentBuilderImpl();
- }
}
public static class Child extends Parent {
private static final class ChildBuilderImpl extends ChildBuilder<Child, ChildBuilderImpl> {
diff --git a/test/transform/resource/after-ecj/SuperBuilderCustomized.java b/test/transform/resource/after-ecj/SuperBuilderCustomized.java
index 32317f6a..fe0e1238 100644
--- a/test/transform/resource/after-ecj/SuperBuilderCustomized.java
+++ b/test/transform/resource/after-ecj/SuperBuilderCustomized.java
@@ -32,12 +32,14 @@ public class SuperBuilderCustomized {
}
}
int field1;
- protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderCustomized.Parent.ParentBuilder<?, ?> b) {
+ protected Parent(ParentBuilder<?, ?> b) {
super();
+ if ((b.field1 == 0))
+ throw new IllegalArgumentException("field1 must be != 0");
this.field1 = b.field1;
}
- public static @java.lang.SuppressWarnings("all") SuperBuilderCustomized.Parent.ParentBuilder<?, ?> builder() {
- return new SuperBuilderCustomized.Parent.ParentBuilderImpl();
+ public static SuperBuilderCustomized.Parent.ParentBuilder<?, ?> builder(int field1) {
+ return new SuperBuilderCustomized.Parent.ParentBuilderImpl().field1(field1);
}
}
public static @lombok.experimental.SuperBuilder class Child extends Parent {
diff --git a/test/transform/resource/before/SuperBuilderCustomized.java b/test/transform/resource/before/SuperBuilderCustomized.java
index 77830587..8e641d90 100644
--- a/test/transform/resource/before/SuperBuilderCustomized.java
+++ b/test/transform/resource/before/SuperBuilderCustomized.java
@@ -14,6 +14,16 @@ public class SuperBuilderCustomized {
}
}
int field1;
+
+ protected Parent(ParentBuilder<?, ?> b) {
+ if (b.field1 == 0)
+ throw new IllegalArgumentException("field1 must be != 0");
+ this.field1 = b.field1;
+ }
+
+ public static SuperBuilderCustomized.Parent.ParentBuilder<?, ?> builder(int field1) {
+ return new SuperBuilderCustomized.Parent.ParentBuilderImpl().field1(field1);
+ }
}
@lombok.experimental.SuperBuilder