blob: 16caf39eab54bb771f6cb56ddae0a4fcf2c2d5a1 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
import lombok.Builder;
import lombok.Singular;
public @Builder class BuilderDefaultsWarnings {
public static @java.lang.SuppressWarnings("all") class BuilderDefaultsWarningsBuilder {
private @java.lang.SuppressWarnings("all") long x;
private @java.lang.SuppressWarnings("all") int z;
private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> items;
@java.lang.SuppressWarnings("all") BuilderDefaultsWarningsBuilder() {
super();
}
/**
* @return {@code this}.
*/
public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder x(final long x) {
this.x = x;
return this;
}
/**
* @return {@code this}.
*/
public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder z(final int z) {
this.z = z;
return this;
}
public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder item(final String item) {
if ((this.items == null))
this.items = new java.util.ArrayList<String>();
this.items.add(item);
return this;
}
public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder items(final java.util.Collection<? extends String> items) {
if ((items == null))
{
throw new java.lang.NullPointerException("items cannot be null");
}
if ((this.items == null))
this.items = new java.util.ArrayList<String>();
this.items.addAll(items);
return this;
}
public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder clearItems() {
if ((this.items != null))
this.items.clear();
return this;
}
public @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings build() {
java.util.List<String> items;
switch (((this.items == null) ? 0 : this.items.size())) {
case 0 :
items = java.util.Collections.emptyList();
break;
case 1 :
items = java.util.Collections.singletonList(this.items.get(0));
break;
default :
items = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.items));
}
return new BuilderDefaultsWarnings(this.x, this.z, items);
}
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
return (((((("BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder(x=" + this.x) + ", z=") + this.z) + ", items=") + this.items) + ")");
}
}
long x = System.currentTimeMillis();
final int y = 5;
@Builder.Default int z;
@Builder.Default @Singular java.util.List<String> items;
@java.lang.SuppressWarnings("all") BuilderDefaultsWarnings(final long x, final int z, final java.util.List<String> items) {
super();
this.x = x;
this.z = z;
this.items = items;
}
public static @java.lang.SuppressWarnings("all") BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder builder() {
return new BuilderDefaultsWarnings.BuilderDefaultsWarningsBuilder();
}
}
class NoBuilderButHasDefaults {
public static @java.lang.SuppressWarnings("all") class NoBuilderButHasDefaultsBuilder {
@java.lang.SuppressWarnings("all") NoBuilderButHasDefaultsBuilder() {
super();
}
public @java.lang.SuppressWarnings("all") NoBuilderButHasDefaults build() {
return new NoBuilderButHasDefaults();
}
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
return "NoBuilderButHasDefaults.NoBuilderButHasDefaultsBuilder()";
}
}
private final @Builder.Default long z = 5;
public @Builder NoBuilderButHasDefaults() {
super();
}
public static @java.lang.SuppressWarnings("all") NoBuilderButHasDefaults.NoBuilderButHasDefaultsBuilder builder() {
return new NoBuilderButHasDefaults.NoBuilderButHasDefaultsBuilder();
}
}
|