aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/CheckerFrameworkBuilder.java
blob: 213a1af6aca726f0d8c23fc3dcd13a5728fa7bb8 (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
98
99
100
101
102
103
104
105
106
107
// skip-idempotent
import java.util.List;
class CheckerFrameworkBuilder {
	int x;
	int y;
	int z;
	List<String> names;
	@java.lang.SuppressWarnings("all")
	private static int $default$x() {
		return 5;
	}
	@java.lang.SuppressWarnings("all")
	CheckerFrameworkBuilder(final int x, final int y, final int z, final List<String> names) {
		this.x = x;
		this.y = y;
		this.z = z;
		this.names = names;
	}
	@java.lang.SuppressWarnings("all")
	public static class CheckerFrameworkBuilderBuilder {
		@java.lang.SuppressWarnings("all")
		private boolean x$set;
		@java.lang.SuppressWarnings("all")
		private int x$value;
		@java.lang.SuppressWarnings("all")
		private int y;
		@java.lang.SuppressWarnings("all")
		private int z;
		@java.lang.SuppressWarnings("all")
		private java.util.ArrayList<String> names;
		@java.lang.SuppressWarnings("all")
		CheckerFrameworkBuilderBuilder() {
		}
		@org.checkerframework.common.returnsreceiver.qual.This
		@java.lang.SuppressWarnings("all")
		public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder x(CheckerFrameworkBuilder.@org.checkerframework.checker.objectconstruction.qual.NotCalledMethods("x") CheckerFrameworkBuilderBuilder this, final int x) {
			this.x$value = x;
			x$set = true;
			return this;
		}
		@org.checkerframework.common.returnsreceiver.qual.This
		@java.lang.SuppressWarnings("all")
		public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder y(CheckerFrameworkBuilder.@org.checkerframework.checker.objectconstruction.qual.NotCalledMethods("y") CheckerFrameworkBuilderBuilder this, final int y) {
			this.y = y;
			return this;
		}
		@org.checkerframework.common.returnsreceiver.qual.This
		@java.lang.SuppressWarnings("all")
		public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder z(CheckerFrameworkBuilder.@org.checkerframework.checker.objectconstruction.qual.NotCalledMethods("z") CheckerFrameworkBuilderBuilder this, final int z) {
			this.z = z;
			return this;
		}
		@org.checkerframework.common.returnsreceiver.qual.This
		@java.lang.SuppressWarnings("all")
		public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder name(final String name) {
			if (this.names == null) this.names = new java.util.ArrayList<String>();
			this.names.add(name);
			return this;
		}
		@org.checkerframework.common.returnsreceiver.qual.This
		@java.lang.SuppressWarnings("all")
		public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder names(final java.util.Collection<? extends String> names) {
			if (names == null) {
				throw new java.lang.NullPointerException("names cannot be null");
			}
			if (this.names == null) this.names = new java.util.ArrayList<String>();
			this.names.addAll(names);
			return this;
		}
		@org.checkerframework.common.returnsreceiver.qual.This
		@java.lang.SuppressWarnings("all")
		public CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder clearNames() {
			if (this.names != null) this.names.clear();
			return this;
		}
		@org.checkerframework.dataflow.qual.SideEffectFree
		@java.lang.SuppressWarnings("all")
		public CheckerFrameworkBuilder build(CheckerFrameworkBuilder.@org.checkerframework.checker.objectconstruction.qual.CalledMethods({"y", "z"}) CheckerFrameworkBuilderBuilder this) {
			java.util.List<String> names;
			switch (this.names == null ? 0 : this.names.size()) {
			case 0: 
				names = java.util.Collections.emptyList();
				break;
			case 1: 
				names = java.util.Collections.singletonList(this.names.get(0));
				break;
			default: 
				names = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.names));
			}
			int x$value = this.x$value;
			if (!this.x$set) x$value = CheckerFrameworkBuilder.$default$x();
			return new CheckerFrameworkBuilder(x$value, this.y, this.z, names);
		}
		@org.checkerframework.dataflow.qual.SideEffectFree
		@java.lang.Override
		@java.lang.SuppressWarnings("all")
		public java.lang.String toString() {
			return "CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder(x$value=" + this.x$value + ", y=" + this.y + ", z=" + this.z + ", names=" + this.names + ")";
		}
	}
	
	@org.checkerframework.dataflow.qual.SideEffectFree
	@java.lang.SuppressWarnings("all")
	public static CheckerFrameworkBuilder.@org.checkerframework.common.aliasing.qual.Unique CheckerFrameworkBuilderBuilder builder() {
		return new CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder();
	}
}