|
34 | 34 | // IMPORTANT: Do not edit. This file is generated. |
35 | 35 | class JsonExprImpl implements JsonExpr { |
36 | 36 |
|
37 | | - final static XsExprImpl xs = XsExprImpl.xs; |
| 37 | + final static XsExprImpl xs = XsExprImpl.xs; |
38 | 38 |
|
39 | | - final static JsonExprImpl json = new JsonExprImpl(); |
| 39 | + final static JsonExprImpl json = new JsonExprImpl(); |
40 | 40 |
|
41 | | - JsonExprImpl() { |
42 | | - } |
43 | | - |
44 | | - |
45 | | - @Override |
46 | | - public JsonArrayExpr array() { |
47 | | - return new ArrayCallImpl("json", "array", new Object[]{ }); |
48 | | - } |
49 | | - |
50 | | - |
51 | | - @Override |
52 | | - public JsonArrayExpr array(ElementNodeExpr array) { |
53 | | - if (array == null) { |
54 | | - throw new IllegalArgumentException("array parameter for array() cannot be null"); |
| 41 | + JsonExprImpl() { |
55 | 42 | } |
56 | | - return new ArrayCallImpl("json", "array", new Object[]{ array }); |
57 | | - } |
58 | | - |
59 | 43 |
|
60 | | - @Override |
61 | | - public XsUnsignedLongExpr arraySize(JsonArrayExpr array) { |
62 | | - return new XsExprImpl.UnsignedLongCallImpl("json", "array-size", new Object[]{ array }); |
63 | | - } |
64 | | - |
65 | | - |
66 | | - @Override |
67 | | - public ItemSeqExpr arrayValues(JsonArrayExpr array) { |
68 | | - if (array == null) { |
69 | | - throw new IllegalArgumentException("array parameter for arrayValues() cannot be null"); |
| 44 | + |
| 45 | + @Override |
| 46 | + public JsonArrayExpr array() { |
| 47 | + return new ArrayCallImpl("json", "array", new Object[]{ }); |
70 | 48 | } |
71 | | - return new BaseTypeImpl.ItemSeqCallImpl("json", "array-values", new Object[]{ array }); |
72 | | - } |
73 | | - |
74 | | - |
75 | | - @Override |
76 | | - public ItemSeqExpr arrayValues(JsonArrayExpr array, boolean flatten) { |
77 | | - return arrayValues(array, xs.booleanVal(flatten)); |
78 | | - } |
79 | 49 |
|
| 50 | + |
| 51 | + @Override |
| 52 | + public JsonArrayExpr array(ElementNodeExpr array) { |
| 53 | + if (array == null) { |
| 54 | + throw new IllegalArgumentException("array parameter for array() cannot be null"); |
| 55 | + } |
| 56 | + return new ArrayCallImpl("json", "array", new Object[]{ array }); |
| 57 | + } |
80 | 58 |
|
81 | | - @Override |
82 | | - public ItemSeqExpr arrayValues(JsonArrayExpr array, XsBooleanExpr flatten) { |
83 | | - if (array == null) { |
84 | | - throw new IllegalArgumentException("array parameter for arrayValues() cannot be null"); |
| 59 | + |
| 60 | + @Override |
| 61 | + public XsUnsignedLongExpr arraySize(JsonArrayExpr array) { |
| 62 | + return new XsExprImpl.UnsignedLongCallImpl("json", "array-size", new Object[]{ array }); |
85 | 63 | } |
86 | | - return new BaseTypeImpl.ItemSeqCallImpl("json", "array-values", new Object[]{ array, flatten }); |
87 | | - } |
88 | 64 |
|
| 65 | + |
| 66 | + @Override |
| 67 | + public ItemSeqExpr arrayValues(JsonArrayExpr array) { |
| 68 | + if (array == null) { |
| 69 | + throw new IllegalArgumentException("array parameter for arrayValues() cannot be null"); |
| 70 | + } |
| 71 | + return new BaseTypeImpl.ItemSeqCallImpl("json", "array-values", new Object[]{ array }); |
| 72 | + } |
89 | 73 |
|
90 | | - @Override |
91 | | - public JsonObjectExpr object() { |
92 | | - return new ObjectCallImpl("json", "object", new Object[]{ }); |
93 | | - } |
| 74 | + |
| 75 | + @Override |
| 76 | + public ItemSeqExpr arrayValues(JsonArrayExpr array, boolean flatten) { |
| 77 | + return arrayValues(array, xs.booleanVal(flatten)); |
| 78 | + } |
94 | 79 |
|
| 80 | + |
| 81 | + @Override |
| 82 | + public ItemSeqExpr arrayValues(JsonArrayExpr array, XsBooleanExpr flatten) { |
| 83 | + if (array == null) { |
| 84 | + throw new IllegalArgumentException("array parameter for arrayValues() cannot be null"); |
| 85 | + } |
| 86 | + return new BaseTypeImpl.ItemSeqCallImpl("json", "array-values", new Object[]{ array, flatten }); |
| 87 | + } |
95 | 88 |
|
96 | | - @Override |
97 | | - public JsonObjectExpr object(ElementNodeExpr map) { |
98 | | - if (map == null) { |
99 | | - throw new IllegalArgumentException("map parameter for object() cannot be null"); |
| 89 | + |
| 90 | + @Override |
| 91 | + public JsonObjectExpr object() { |
| 92 | + return new ObjectCallImpl("json", "object", new Object[]{ }); |
100 | 93 | } |
101 | | - return new ObjectCallImpl("json", "object", new Object[]{ map }); |
102 | | - } |
103 | 94 |
|
| 95 | + |
| 96 | + @Override |
| 97 | + public JsonObjectExpr object(ElementNodeExpr map) { |
| 98 | + if (map == null) { |
| 99 | + throw new IllegalArgumentException("map parameter for object() cannot be null"); |
| 100 | + } |
| 101 | + return new ObjectCallImpl("json", "object", new Object[]{ map }); |
| 102 | + } |
104 | 103 |
|
105 | | - @Override |
106 | | - public JsonObjectExpr objectDefine() { |
107 | | - return new ObjectCallImpl("json", "object-define", new Object[]{ }); |
108 | | - } |
| 104 | + |
| 105 | + @Override |
| 106 | + public JsonObjectExpr objectDefine() { |
| 107 | + return new ObjectCallImpl("json", "object-define", new Object[]{ }); |
| 108 | + } |
109 | 109 |
|
| 110 | + |
| 111 | + @Override |
| 112 | + public JsonObjectExpr objectDefine(XsStringSeqExpr keys) { |
| 113 | + return new ObjectCallImpl("json", "object-define", new Object[]{ keys }); |
| 114 | + } |
110 | 115 |
|
111 | | - @Override |
112 | | - public JsonObjectExpr objectDefine(XsStringSeqExpr keys) { |
113 | | - return new ObjectCallImpl("json", "object-define", new Object[]{ keys }); |
114 | | - } |
| 116 | + |
| 117 | + @Override |
| 118 | + public JsonArrayExpr subarray(JsonArrayExpr array, double startingLoc) { |
| 119 | + return subarray(array, xs.doubleVal(startingLoc)); |
| 120 | + } |
115 | 121 |
|
| 122 | + |
| 123 | + @Override |
| 124 | + public JsonArrayExpr subarray(JsonArrayExpr array, XsNumericExpr startingLoc) { |
| 125 | + if (array == null) { |
| 126 | + throw new IllegalArgumentException("array parameter for subarray() cannot be null"); |
| 127 | + } |
| 128 | + if (startingLoc == null) { |
| 129 | + throw new IllegalArgumentException("startingLoc parameter for subarray() cannot be null"); |
| 130 | + } |
| 131 | + return new ArrayCallImpl("json", "subarray", new Object[]{ array, startingLoc }); |
| 132 | + } |
116 | 133 |
|
117 | | - @Override |
118 | | - public JsonArrayExpr subarray(JsonArrayExpr array, double startingLoc) { |
119 | | - return subarray(array, xs.doubleVal(startingLoc)); |
120 | | - } |
| 134 | + |
| 135 | + @Override |
| 136 | + public JsonArrayExpr subarray(JsonArrayExpr array, double startingLoc, double length) { |
| 137 | + return subarray(array, xs.doubleVal(startingLoc), xs.doubleVal(length)); |
| 138 | + } |
121 | 139 |
|
| 140 | + |
| 141 | + @Override |
| 142 | + public JsonArrayExpr subarray(JsonArrayExpr array, XsNumericExpr startingLoc, XsNumericExpr length) { |
| 143 | + if (array == null) { |
| 144 | + throw new IllegalArgumentException("array parameter for subarray() cannot be null"); |
| 145 | + } |
| 146 | + if (startingLoc == null) { |
| 147 | + throw new IllegalArgumentException("startingLoc parameter for subarray() cannot be null"); |
| 148 | + } |
| 149 | + if (length == null) { |
| 150 | + throw new IllegalArgumentException("length parameter for subarray() cannot be null"); |
| 151 | + } |
| 152 | + return new ArrayCallImpl("json", "subarray", new Object[]{ array, startingLoc, length }); |
| 153 | + } |
122 | 154 |
|
123 | | - @Override |
124 | | - public JsonArrayExpr subarray(JsonArrayExpr array, XsNumericExpr startingLoc) { |
125 | | - if (array == null) { |
126 | | - throw new IllegalArgumentException("array parameter for subarray() cannot be null"); |
| 155 | + |
| 156 | + @Override |
| 157 | + public JsonArrayExpr toArray() { |
| 158 | + return new ArrayCallImpl("json", "to-array", new Object[]{ }); |
127 | 159 | } |
128 | | - if (startingLoc == null) { |
129 | | - throw new IllegalArgumentException("startingLoc parameter for subarray() cannot be null"); |
| 160 | + |
| 161 | + |
| 162 | + @Override |
| 163 | + public JsonArrayExpr toArray(ItemSeqExpr items) { |
| 164 | + return new ArrayCallImpl("json", "to-array", new Object[]{ items }); |
130 | 165 | } |
131 | | - return new ArrayCallImpl("json", "subarray", new Object[]{ array, startingLoc }); |
132 | | - } |
133 | 166 |
|
| 167 | + |
| 168 | + @Override |
| 169 | + public JsonArrayExpr toArray(ItemSeqExpr items, double limit) { |
| 170 | + return toArray(items, xs.doubleVal(limit)); |
| 171 | + } |
134 | 172 |
|
135 | | - @Override |
136 | | - public JsonArrayExpr subarray(JsonArrayExpr array, double startingLoc, double length) { |
137 | | - return subarray(array, xs.doubleVal(startingLoc), xs.doubleVal(length)); |
138 | | - } |
| 173 | + |
| 174 | + @Override |
| 175 | + public JsonArrayExpr toArray(ItemSeqExpr items, XsNumericExpr limit) { |
| 176 | + return new ArrayCallImpl("json", "to-array", new Object[]{ items, limit }); |
| 177 | + } |
139 | 178 |
|
| 179 | + |
| 180 | + @Override |
| 181 | + public JsonArrayExpr toArray(ItemSeqExpr items, double limit, ItemExpr zero) { |
| 182 | + return toArray(items, xs.doubleVal(limit), zero); |
| 183 | + } |
140 | 184 |
|
141 | | - @Override |
142 | | - public JsonArrayExpr subarray(JsonArrayExpr array, XsNumericExpr startingLoc, XsNumericExpr length) { |
143 | | - if (array == null) { |
144 | | - throw new IllegalArgumentException("array parameter for subarray() cannot be null"); |
| 185 | + |
| 186 | + @Override |
| 187 | + public JsonArrayExpr toArray(ItemSeqExpr items, XsNumericExpr limit, ItemExpr zero) { |
| 188 | + return new ArrayCallImpl("json", "to-array", new Object[]{ items, limit, zero }); |
145 | 189 | } |
146 | | - if (startingLoc == null) { |
147 | | - throw new IllegalArgumentException("startingLoc parameter for subarray() cannot be null"); |
| 190 | + |
| 191 | + @Override |
| 192 | + public JsonArraySeqExpr arraySeq(JsonArrayExpr... items) { |
| 193 | + return new ArraySeqListImpl(items); |
148 | 194 | } |
149 | | - if (length == null) { |
150 | | - throw new IllegalArgumentException("length parameter for subarray() cannot be null"); |
| 195 | + static class ArraySeqListImpl extends BaseTypeImpl.BaseListImpl<BaseTypeImpl.BaseArgImpl> implements JsonArraySeqExpr { |
| 196 | + ArraySeqListImpl(Object[] items) { |
| 197 | + super(BaseTypeImpl.convertList(items)); |
| 198 | + } |
151 | 199 | } |
152 | | - return new ArrayCallImpl("json", "subarray", new Object[]{ array, startingLoc, length }); |
153 | | - } |
154 | | - |
155 | | - |
156 | | - @Override |
157 | | - public JsonArrayExpr toArray() { |
158 | | - return new ArrayCallImpl("json", "to-array", new Object[]{ }); |
159 | | - } |
160 | | - |
161 | | - |
162 | | - @Override |
163 | | - public JsonArrayExpr toArray(ItemSeqExpr items) { |
164 | | - return new ArrayCallImpl("json", "to-array", new Object[]{ items }); |
165 | | - } |
166 | | - |
167 | | - |
168 | | - @Override |
169 | | - public JsonArrayExpr toArray(ItemSeqExpr items, double limit) { |
170 | | - return toArray(items, xs.doubleVal(limit)); |
171 | | - } |
172 | | - |
173 | | - |
174 | | - @Override |
175 | | - public JsonArrayExpr toArray(ItemSeqExpr items, XsNumericExpr limit) { |
176 | | - return new ArrayCallImpl("json", "to-array", new Object[]{ items, limit }); |
177 | | - } |
178 | | - |
179 | | - |
180 | | - @Override |
181 | | - public JsonArrayExpr toArray(ItemSeqExpr items, double limit, ItemExpr zero) { |
182 | | - return toArray(items, xs.doubleVal(limit), zero); |
183 | | - } |
184 | | - |
185 | | - |
186 | | - @Override |
187 | | - public JsonArrayExpr toArray(ItemSeqExpr items, XsNumericExpr limit, ItemExpr zero) { |
188 | | - return new ArrayCallImpl("json", "to-array", new Object[]{ items, limit, zero }); |
189 | | - } |
190 | | - |
191 | | - @Override |
192 | | - public JsonArraySeqExpr arraySeq(JsonArrayExpr... items) { |
193 | | - return new ArraySeqListImpl(items); |
194 | | - } |
195 | | - static class ArraySeqListImpl extends BaseTypeImpl.BaseListImpl<BaseTypeImpl.BaseArgImpl> implements JsonArraySeqExpr { |
196 | | - ArraySeqListImpl(Object[] items) { |
197 | | - super(BaseTypeImpl.convertList(items)); |
| 200 | + static class ArraySeqCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonArraySeqExpr { |
| 201 | + ArraySeqCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
| 202 | + super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 203 | + } |
198 | 204 | } |
199 | | - } |
200 | | - static class ArraySeqCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonArraySeqExpr { |
201 | | - ArraySeqCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
202 | | - super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 205 | + static class ArrayCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonArrayExpr { |
| 206 | + ArrayCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
| 207 | + super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 208 | + } |
203 | 209 | } |
204 | | - } |
205 | | - static class ArrayCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonArrayExpr { |
206 | | - ArrayCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
207 | | - super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 210 | + |
| 211 | + @Override |
| 212 | + public JsonObjectSeqExpr objectSeq(JsonObjectExpr... items) { |
| 213 | + return new ObjectSeqListImpl(items); |
208 | 214 | } |
209 | | - } |
210 | | - |
211 | | - @Override |
212 | | - public JsonObjectSeqExpr objectSeq(JsonObjectExpr... items) { |
213 | | - return new ObjectSeqListImpl(items); |
214 | | - } |
215 | | - static class ObjectSeqListImpl extends BaseTypeImpl.BaseListImpl<BaseTypeImpl.BaseArgImpl> implements JsonObjectSeqExpr { |
216 | | - ObjectSeqListImpl(Object[] items) { |
217 | | - super(BaseTypeImpl.convertList(items)); |
| 215 | + static class ObjectSeqListImpl extends BaseTypeImpl.BaseListImpl<BaseTypeImpl.BaseArgImpl> implements JsonObjectSeqExpr { |
| 216 | + ObjectSeqListImpl(Object[] items) { |
| 217 | + super(BaseTypeImpl.convertList(items)); |
| 218 | + } |
218 | 219 | } |
219 | | - } |
220 | | - static class ObjectSeqCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonObjectSeqExpr { |
221 | | - ObjectSeqCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
222 | | - super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 220 | + static class ObjectSeqCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonObjectSeqExpr { |
| 221 | + ObjectSeqCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
| 222 | + super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 223 | + } |
223 | 224 | } |
224 | | - } |
225 | | - static class ObjectCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonObjectExpr { |
226 | | - ObjectCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
227 | | - super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 225 | + static class ObjectCallImpl extends BaseTypeImpl.BaseCallImpl<BaseTypeImpl.BaseArgImpl> implements JsonObjectExpr { |
| 226 | + ObjectCallImpl(String fnPrefix, String fnName, Object[] fnArgs) { |
| 227 | + super(fnPrefix, fnName, BaseTypeImpl.convertList(fnArgs)); |
| 228 | + } |
228 | 229 | } |
229 | | - } |
230 | 230 |
|
231 | | -} |
| 231 | + } |
0 commit comments