mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 06:16:14 +00:00
code formatting, reordering, rename etc.
This commit is contained in:
1 parent
04269ef14b
commit
4c5a7cddab
3 files changed
+454
-412
No files matched your search
@@ -5,22 +5,6 @@ public class SuperBuilderBasic {
|
||||
int field1;
|
||||
List<String> items;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected Parent(final ParentBuilder<?, ?> b) {
|
||||
this.field1 = b.field1;
|
||||
java.util.List<String> items;
|
||||
switch (b.items == null ? 0 : b.items.size()) {
|
||||
case 0:
|
||||
items = java.util.Collections.emptyList();
|
||||
break;
|
||||
case 1:
|
||||
items = java.util.Collections.singletonList(b.items.get(0));
|
||||
break;
|
||||
default:
|
||||
items = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(b.items));
|
||||
}
|
||||
this.items = items;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static abstract class ParentBuilder<C extends Parent, B extends ParentBuilder<C, B>> {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int field1;
|
||||
@@ -75,6 +59,22 @@ public class SuperBuilderBasic {
|
||||
}
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected Parent(final ParentBuilder<?, ?> b) {
|
||||
this.field1 = b.field1;
|
||||
java.util.List<String> items;
|
||||
switch (b.items == null ? 0 : b.items.size()) {
|
||||
case 0:
|
||||
items = java.util.Collections.emptyList();
|
||||
break;
|
||||
case 1:
|
||||
items = java.util.Collections.singletonList(b.items.get(0));
|
||||
break;
|
||||
default:
|
||||
items = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(b.items));
|
||||
}
|
||||
this.items = items;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static ParentBuilder<?, ?> builder() {
|
||||
return new ParentBuilderImpl();
|
||||
}
|
||||
@@ -83,11 +83,6 @@ public class SuperBuilderBasic {
|
||||
public static class Child extends Parent {
|
||||
double field3;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected Child(final ChildBuilder<?, ?> b) {
|
||||
super(b);
|
||||
this.field3 = b.field3;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static abstract class ChildBuilder<C extends Child, B extends ChildBuilder<C, B>> extends Parent.ParentBuilder<C, B> {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private double field3;
|
||||
@@ -125,6 +120,11 @@ public class SuperBuilderBasic {
|
||||
}
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected Child(final ChildBuilder<?, ?> b) {
|
||||
super(b);
|
||||
this.field3 = b.field3;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static ChildBuilder<?, ?> builder() {
|
||||
return new ChildBuilderImpl();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user