diff options
author | Jan Rieke <rieke@subshell.com> | 2018-09-24 09:26:37 +0200 |
---|---|---|
committer | Jan Rieke <rieke@subshell.com> | 2018-09-24 09:26:37 +0200 |
commit | 279ceaa72795ea7b427ab37535892e3c5cbde958 (patch) | |
tree | c8d78adb99f3a7bb34dc63721429a5fb4e3a6489 /test/transform | |
parent | 68318742ef2e4f6b680ea90a279c2c96da7c2d74 (diff) | |
download | lombok-279ceaa72795ea7b427ab37535892e3c5cbde958.tar.gz lombok-279ceaa72795ea7b427ab37535892e3c5cbde958.tar.bz2 lombok-279ceaa72795ea7b427ab37535892e3c5cbde958.zip |
SuperBuilder toBuilder with generics (ecj)
Diffstat (limited to 'test/transform')
-rw-r--r-- | test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java index fcdadb3b..40e3bdca 100644 --- a/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java +++ b/test/transform/resource/after-ecj/SuperBuilderWithGenericsAndToBuilder.java @@ -1,12 +1,6 @@ import java.util.List;
-
-import SuperBuilderBasicToBuilder.Child;
-import SuperBuilderBasicToBuilder.Parent;
-import SuperBuilderBasicToBuilder.Child.ChildBuilder;
-import SuperBuilderBasicToBuilder.Child.ChildBuilderImpl;
-import SuperBuilderBasicToBuilder.Parent.ParentBuilder;
public class SuperBuilderWithGenericsAndToBuilder {
- public static @lombok.experimental.SuperBuilder class Parent<A> {
+ public static @lombok.experimental.SuperBuilder(toBuilder = true) class Parent<A> {
public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder<A, C extends Parent<A>, B extends ParentBuilder<A, C, B>> {
private @java.lang.SuppressWarnings("all") A field1;
private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> items;
@@ -14,10 +8,10 @@ public class SuperBuilderWithGenericsAndToBuilder { super();
}
protected @java.lang.SuppressWarnings("all") B $fillValuesFrom(final C instance) {
- ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
- return self();
- }
- private static @java.lang.SuppressWarnings("all") void <A>$fillValuesFromInstanceIntoBuilder(final Parent<A> instance, final ParentBuilder<A, ?, ?> b) {
+ ParentBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
+ return self();
+ }
+ private static @java.lang.SuppressWarnings("all") <A>void $fillValuesFromInstanceIntoBuilder(final Parent<A> instance, final ParentBuilder<A, ?, ?> b) {
b.field1(instance.field1);
b.items(((instance.items == null) ? java.util.Collections.emptyList() : instance.items));
}
@@ -77,14 +71,14 @@ public class SuperBuilderWithGenericsAndToBuilder { }
this.items = items;
}
- public @java.lang.SuppressWarnings("all") <A>ParentBuilder<A, ?, ?> toBuilder() {
+ public @java.lang.SuppressWarnings("all") ParentBuilder<A, ?, ?> toBuilder() {
return new ParentBuilderImpl<A>().$fillValuesFrom(this);
}
public static @java.lang.SuppressWarnings("all") <A>ParentBuilder<A, ?, ?> builder() {
return new ParentBuilderImpl<A>();
}
}
- public static @lombok.experimental.SuperBuilder class Child<A> extends Parent<A> {
+ public static @lombok.experimental.SuperBuilder(toBuilder = true) class Child<A> extends Parent<A> {
public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder<A, C extends Child<A>, B extends ChildBuilder<A, C, B>> extends Parent.ParentBuilder<A, C, B> {
private @java.lang.SuppressWarnings("all") double field3;
public ChildBuilder() {
@@ -95,7 +89,7 @@ public class SuperBuilderWithGenericsAndToBuilder { ChildBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
return self();
}
- private static @java.lang.SuppressWarnings("all") void <A>$fillValuesFromInstanceIntoBuilder(final Child<A> instance, final ChildBuilder<A, <d?, ?> b) {
+ private static @java.lang.SuppressWarnings("all") <A>void $fillValuesFromInstanceIntoBuilder(final Child<A> instance, final ChildBuilder<A, ?, ?> b) {
b.field3(instance.field3);
}
protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self();
@@ -131,7 +125,7 @@ public class SuperBuilderWithGenericsAndToBuilder { return new ChildBuilderImpl<A>();
}
}
- public SuperBuilderWithGenerics() {
+ public SuperBuilderWithGenericsAndToBuilder() {
super();
}
public static void test() {
|