mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 20:17:25 +00:00
finished tests for builder (added after-delombok versions).
This commit is contained in:
1 parent
e047d2b94e
commit
eb3d32c718
3 files changed
+114
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import java.util.List;
|
||||
class BuilderSimple<T> {
|
||||
private final int noshow = 0;
|
||||
private final int yes;
|
||||
private List<T> also;
|
||||
private int $butNotMe;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private BuilderSimple(final int yes, final List<T> also) {
|
||||
this.yes = yes;
|
||||
this.also = also;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static class BuilderSimpleBuilder<T> {
|
||||
private int yes;
|
||||
private List<T> also;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
BuilderSimpleBuilder() {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public BuilderSimpleBuilder<T> yes(final int yes) {
|
||||
this.yes = yes;
|
||||
return this;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public BuilderSimpleBuilder<T> also(final List<T> also) {
|
||||
this.also = also;
|
||||
return this;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public BuilderSimple<T> build() {
|
||||
return new BuilderSimple<T>(yes, also);
|
||||
}
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static <T> BuilderSimpleBuilder<T> builder() {
|
||||
return new BuilderSimpleBuilder<T>();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user