blob: 283bacd416497d9dd14ba952fdea85c636eb0c8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
import java.util.List;
public class SuperBuilderCustomizedWithSetterPrefix {
public static @lombok.experimental.SuperBuilder(setterPrefix = "set") class Parent {
public static abstract class ParentBuilder<C extends Parent, B extends ParentBuilder<C, B>> {
private @java.lang.SuppressWarnings("all") int field1;
public ParentBuilder() {
super();
}
public B setField1(int field1) {
this.field1 = (field1 + 1);
return self();
}
protected abstract @java.lang.SuppressWarnings("all") B self();
public abstract @java.lang.SuppressWarnings("all") C build();
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
return (("SuperBuilderCustomizedWithSetterPrefix.Parent.ParentBuilder(field1=" + this.field1) + ")");
}
}
private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends SuperBuilderCustomizedWithSetterPrefix.Parent.ParentBuilder<SuperBuilderCustomizedWithSetterPrefix.Parent, SuperBuilderCustomizedWithSetterPrefix.Parent.ParentBuilderImpl> {
private ParentBuilderImpl() {
super();
}
protected @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderCustomizedWithSetterPrefix.Parent.ParentBuilderImpl self() {
return this;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") SuperBuilderCustomizedWithSetterPrefix.Parent build() {
return new SuperBuilderCustomizedWithSetterPrefix.Parent(this);
}
}
int field1;
protected @java.lang.SuppressWarnings("all") Parent(final SuperBuilderCustomizedWithSetterPrefix.Parent.ParentBuilder<?, ?> b) {
super();
this.field1 = b.field1;
}
public static @java.lang.SuppressWarnings("all") SuperBuilderCustomizedWithSetterPrefix.Parent.ParentBuilder<?, ?> builder() {
return new SuperBuilderCustomizedWithSetterPrefix.Parent.ParentBuilderImpl();
}
}
public SuperBuilderCustomizedWithSetterPrefix() {
super();
}
public static void test() {
Parent x = Parent.builder().setField1(5).build();
}
}
|