blob: 4b423ee0911a471817bfd314285ab00bd4fb99a4 (
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
46
47
|
import java.util.List;
class BuilderCustomName<T> {
private final int field;
@java.lang.SuppressWarnings("all")
public static abstract class SimpleTestBuilder<T, C extends BuilderCustomName<T>, B extends BuilderCustomName.SimpleTestBuilder<T, C, B>> {
@java.lang.SuppressWarnings("all")
private int field;
@java.lang.SuppressWarnings("all")
protected abstract B self();
@java.lang.SuppressWarnings("all")
public abstract C build();
@java.lang.SuppressWarnings("all")
public B field(final int field) {
this.field = field;
return self();
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "BuilderCustomName.SimpleTestBuilder(field=" + this.field + ")";
}
}
@java.lang.SuppressWarnings("all")
private static final class SimpleTestBuilderImpl<T> extends BuilderCustomName.SimpleTestBuilder<T, BuilderCustomName<T>, BuilderCustomName.SimpleTestBuilderImpl<T>> {
@java.lang.SuppressWarnings("all")
private SimpleTestBuilderImpl() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
protected BuilderCustomName.SimpleTestBuilderImpl<T> self() {
return this;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public BuilderCustomName<T> build() {
return new BuilderCustomName<T>(this);
}
}
@java.lang.SuppressWarnings("all")
protected BuilderCustomName(final BuilderCustomName.SimpleTestBuilder<T, ?, ?> b) {
this.field = b.field;
}
@java.lang.SuppressWarnings("all")
public static <T> BuilderCustomName.SimpleTestBuilder<T, ?, ?> builder() {
return new BuilderCustomName.SimpleTestBuilderImpl<T>();
}
}
|