Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1038)

Side by Side Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 1539953002: Fix "if" conditions in summary Builder setters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
7 7
8 library analyzer.src.summary.format; 8 library analyzer.src.summary.format;
9 9
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class PrelinkedDependencyBuilder { 43 class PrelinkedDependencyBuilder {
44 final Map _json = {}; 44 final Map _json = {};
45 45
46 bool _finished = false; 46 bool _finished = false;
47 47
48 PrelinkedDependencyBuilder(builder.BuilderContext context); 48 PrelinkedDependencyBuilder(builder.BuilderContext context);
49 49
50 void set uri(String _value) { 50 void set uri(String _value) {
51 assert(!_finished); 51 assert(!_finished);
52 assert(!_json.containsKey("uri")); 52 assert(!_json.containsKey("uri"));
53 if (_value != null) { 53 if (!(_value == null)) {
54 _json["uri"] = _value; 54 _json["uri"] = _value;
55 } 55 }
56 } 56 }
57 57
58 Map finish() { 58 Map finish() {
59 assert(!_finished); 59 assert(!_finished);
60 _finished = true; 60 _finished = true;
61 return _json; 61 return _json;
62 } 62 }
63 } 63 }
(...skipping 24 matching lines...) Expand all
88 class PrelinkedLibraryBuilder { 88 class PrelinkedLibraryBuilder {
89 final Map _json = {}; 89 final Map _json = {};
90 90
91 bool _finished = false; 91 bool _finished = false;
92 92
93 PrelinkedLibraryBuilder(builder.BuilderContext context); 93 PrelinkedLibraryBuilder(builder.BuilderContext context);
94 94
95 void set units(List<PrelinkedUnitBuilder> _value) { 95 void set units(List<PrelinkedUnitBuilder> _value) {
96 assert(!_finished); 96 assert(!_finished);
97 assert(!_json.containsKey("units")); 97 assert(!_json.containsKey("units"));
98 if (_value != null || _value.isEmpty) { 98 if (!(_value == null || _value.isEmpty)) {
99 _json["units"] = _value.map((b) => b.finish()).toList(); 99 _json["units"] = _value.map((b) => b.finish()).toList();
100 } 100 }
101 } 101 }
102 102
103 void set dependencies(List<PrelinkedDependencyBuilder> _value) { 103 void set dependencies(List<PrelinkedDependencyBuilder> _value) {
104 assert(!_finished); 104 assert(!_finished);
105 assert(!_json.containsKey("dependencies")); 105 assert(!_json.containsKey("dependencies"));
106 if (_value != null || _value.isEmpty) { 106 if (!(_value == null || _value.isEmpty)) {
107 _json["dependencies"] = _value.map((b) => b.finish()).toList(); 107 _json["dependencies"] = _value.map((b) => b.finish()).toList();
108 } 108 }
109 } 109 }
110 110
111 void set importDependencies(List<int> _value) { 111 void set importDependencies(List<int> _value) {
112 assert(!_finished); 112 assert(!_finished);
113 assert(!_json.containsKey("importDependencies")); 113 assert(!_json.containsKey("importDependencies"));
114 if (_value != null || _value.isEmpty) { 114 if (!(_value == null || _value.isEmpty)) {
115 _json["importDependencies"] = _value.toList(); 115 _json["importDependencies"] = _value.toList();
116 } 116 }
117 } 117 }
118 118
119 List<int> toBuffer() => UTF8.encode(JSON.encode(finish())); 119 List<int> toBuffer() => UTF8.encode(JSON.encode(finish()));
120 120
121 Map finish() { 121 Map finish() {
122 assert(!_finished); 122 assert(!_finished);
123 _finished = true; 123 _finished = true;
124 return _json; 124 return _json;
(...skipping 26 matching lines...) Expand all
151 class PrelinkedReferenceBuilder { 151 class PrelinkedReferenceBuilder {
152 final Map _json = {}; 152 final Map _json = {};
153 153
154 bool _finished = false; 154 bool _finished = false;
155 155
156 PrelinkedReferenceBuilder(builder.BuilderContext context); 156 PrelinkedReferenceBuilder(builder.BuilderContext context);
157 157
158 void set dependency(int _value) { 158 void set dependency(int _value) {
159 assert(!_finished); 159 assert(!_finished);
160 assert(!_json.containsKey("dependency")); 160 assert(!_json.containsKey("dependency"));
161 if (_value != null) { 161 if (!(_value == null)) {
162 _json["dependency"] = _value; 162 _json["dependency"] = _value;
163 } 163 }
164 } 164 }
165 165
166 void set kind(PrelinkedReferenceKind _value) { 166 void set kind(PrelinkedReferenceKind _value) {
167 assert(!_finished); 167 assert(!_finished);
168 assert(!_json.containsKey("kind")); 168 assert(!_json.containsKey("kind"));
169 if (_value != null || _value == PrelinkedReferenceKind.classOrEnum) { 169 if (!(_value == null || _value == PrelinkedReferenceKind.classOrEnum)) {
170 _json["kind"] = _value.index; 170 _json["kind"] = _value.index;
171 } 171 }
172 } 172 }
173 173
174 void set unit(int _value) { 174 void set unit(int _value) {
175 assert(!_finished); 175 assert(!_finished);
176 assert(!_json.containsKey("unit")); 176 assert(!_json.containsKey("unit"));
177 if (_value != null) { 177 if (!(_value == null)) {
178 _json["unit"] = _value; 178 _json["unit"] = _value;
179 } 179 }
180 } 180 }
181 181
182 Map finish() { 182 Map finish() {
183 assert(!_finished); 183 assert(!_finished);
184 _finished = true; 184 _finished = true;
185 return _json; 185 return _json;
186 } 186 }
187 } 187 }
(...skipping 18 matching lines...) Expand all
206 class PrelinkedUnitBuilder { 206 class PrelinkedUnitBuilder {
207 final Map _json = {}; 207 final Map _json = {};
208 208
209 bool _finished = false; 209 bool _finished = false;
210 210
211 PrelinkedUnitBuilder(builder.BuilderContext context); 211 PrelinkedUnitBuilder(builder.BuilderContext context);
212 212
213 void set references(List<PrelinkedReferenceBuilder> _value) { 213 void set references(List<PrelinkedReferenceBuilder> _value) {
214 assert(!_finished); 214 assert(!_finished);
215 assert(!_json.containsKey("references")); 215 assert(!_json.containsKey("references"));
216 if (_value != null || _value.isEmpty) { 216 if (!(_value == null || _value.isEmpty)) {
217 _json["references"] = _value.map((b) => b.finish()).toList(); 217 _json["references"] = _value.map((b) => b.finish()).toList();
218 } 218 }
219 } 219 }
220 220
221 Map finish() { 221 Map finish() {
222 assert(!_finished); 222 assert(!_finished);
223 _finished = true; 223 _finished = true;
224 return _json; 224 return _json;
225 } 225 }
226 } 226 }
(...skipping 18 matching lines...) Expand all
245 class SdkBundleBuilder { 245 class SdkBundleBuilder {
246 final Map _json = {}; 246 final Map _json = {};
247 247
248 bool _finished = false; 248 bool _finished = false;
249 249
250 SdkBundleBuilder(builder.BuilderContext context); 250 SdkBundleBuilder(builder.BuilderContext context);
251 251
252 void set libraries(List<SdkBundleLibraryBuilder> _value) { 252 void set libraries(List<SdkBundleLibraryBuilder> _value) {
253 assert(!_finished); 253 assert(!_finished);
254 assert(!_json.containsKey("libraries")); 254 assert(!_json.containsKey("libraries"));
255 if (_value != null || _value.isEmpty) { 255 if (!(_value == null || _value.isEmpty)) {
256 _json["libraries"] = _value.map((b) => b.finish()).toList(); 256 _json["libraries"] = _value.map((b) => b.finish()).toList();
257 } 257 }
258 } 258 }
259 259
260 List<int> toBuffer() => UTF8.encode(JSON.encode(finish())); 260 List<int> toBuffer() => UTF8.encode(JSON.encode(finish()));
261 261
262 Map finish() { 262 Map finish() {
263 assert(!_finished); 263 assert(!_finished);
264 _finished = true; 264 _finished = true;
265 return _json; 265 return _json;
(...skipping 24 matching lines...) Expand all
290 class SdkBundleLibraryBuilder { 290 class SdkBundleLibraryBuilder {
291 final Map _json = {}; 291 final Map _json = {};
292 292
293 bool _finished = false; 293 bool _finished = false;
294 294
295 SdkBundleLibraryBuilder(builder.BuilderContext context); 295 SdkBundleLibraryBuilder(builder.BuilderContext context);
296 296
297 void set uri(String _value) { 297 void set uri(String _value) {
298 assert(!_finished); 298 assert(!_finished);
299 assert(!_json.containsKey("uri")); 299 assert(!_json.containsKey("uri"));
300 if (_value != null) { 300 if (!(_value == null)) {
301 _json["uri"] = _value; 301 _json["uri"] = _value;
302 } 302 }
303 } 303 }
304 304
305 void set prelinked(PrelinkedLibraryBuilder _value) { 305 void set prelinked(PrelinkedLibraryBuilder _value) {
306 assert(!_finished); 306 assert(!_finished);
307 assert(!_json.containsKey("prelinked")); 307 assert(!_json.containsKey("prelinked"));
308 if (_value != null) { 308 if (!(_value == null)) {
309 _json["prelinked"] = _value.finish(); 309 _json["prelinked"] = _value.finish();
310 } 310 }
311 } 311 }
312 312
313 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) { 313 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) {
314 assert(!_finished); 314 assert(!_finished);
315 assert(!_json.containsKey("unlinkedUnits")); 315 assert(!_json.containsKey("unlinkedUnits"));
316 if (_value != null || _value.isEmpty) { 316 if (!(_value == null || _value.isEmpty)) {
317 _json["unlinkedUnits"] = _value.map((b) => b.finish()).toList(); 317 _json["unlinkedUnits"] = _value.map((b) => b.finish()).toList();
318 } 318 }
319 } 319 }
320 320
321 Map finish() { 321 Map finish() {
322 assert(!_finished); 322 assert(!_finished);
323 _finished = true; 323 _finished = true;
324 return _json; 324 return _json;
325 } 325 }
326 } 326 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 class UnlinkedClassBuilder { 372 class UnlinkedClassBuilder {
373 final Map _json = {}; 373 final Map _json = {};
374 374
375 bool _finished = false; 375 bool _finished = false;
376 376
377 UnlinkedClassBuilder(builder.BuilderContext context); 377 UnlinkedClassBuilder(builder.BuilderContext context);
378 378
379 void set name(String _value) { 379 void set name(String _value) {
380 assert(!_finished); 380 assert(!_finished);
381 assert(!_json.containsKey("name")); 381 assert(!_json.containsKey("name"));
382 if (_value != null) { 382 if (!(_value == null)) {
383 _json["name"] = _value; 383 _json["name"] = _value;
384 } 384 }
385 } 385 }
386 386
387 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 387 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
388 assert(!_finished); 388 assert(!_finished);
389 assert(!_json.containsKey("typeParameters")); 389 assert(!_json.containsKey("typeParameters"));
390 if (_value != null || _value.isEmpty) { 390 if (!(_value == null || _value.isEmpty)) {
391 _json["typeParameters"] = _value.map((b) => b.finish()).toList(); 391 _json["typeParameters"] = _value.map((b) => b.finish()).toList();
392 } 392 }
393 } 393 }
394 394
395 void set supertype(UnlinkedTypeRefBuilder _value) { 395 void set supertype(UnlinkedTypeRefBuilder _value) {
396 assert(!_finished); 396 assert(!_finished);
397 assert(!_json.containsKey("supertype")); 397 assert(!_json.containsKey("supertype"));
398 if (_value != null) { 398 if (!(_value == null)) {
399 _json["supertype"] = _value.finish(); 399 _json["supertype"] = _value.finish();
400 } 400 }
401 } 401 }
402 402
403 void set mixins(List<UnlinkedTypeRefBuilder> _value) { 403 void set mixins(List<UnlinkedTypeRefBuilder> _value) {
404 assert(!_finished); 404 assert(!_finished);
405 assert(!_json.containsKey("mixins")); 405 assert(!_json.containsKey("mixins"));
406 if (_value != null || _value.isEmpty) { 406 if (!(_value == null || _value.isEmpty)) {
407 _json["mixins"] = _value.map((b) => b.finish()).toList(); 407 _json["mixins"] = _value.map((b) => b.finish()).toList();
408 } 408 }
409 } 409 }
410 410
411 void set interfaces(List<UnlinkedTypeRefBuilder> _value) { 411 void set interfaces(List<UnlinkedTypeRefBuilder> _value) {
412 assert(!_finished); 412 assert(!_finished);
413 assert(!_json.containsKey("interfaces")); 413 assert(!_json.containsKey("interfaces"));
414 if (_value != null || _value.isEmpty) { 414 if (!(_value == null || _value.isEmpty)) {
415 _json["interfaces"] = _value.map((b) => b.finish()).toList(); 415 _json["interfaces"] = _value.map((b) => b.finish()).toList();
416 } 416 }
417 } 417 }
418 418
419 void set fields(List<UnlinkedVariableBuilder> _value) { 419 void set fields(List<UnlinkedVariableBuilder> _value) {
420 assert(!_finished); 420 assert(!_finished);
421 assert(!_json.containsKey("fields")); 421 assert(!_json.containsKey("fields"));
422 if (_value != null || _value.isEmpty) { 422 if (!(_value == null || _value.isEmpty)) {
423 _json["fields"] = _value.map((b) => b.finish()).toList(); 423 _json["fields"] = _value.map((b) => b.finish()).toList();
424 } 424 }
425 } 425 }
426 426
427 void set executables(List<UnlinkedExecutableBuilder> _value) { 427 void set executables(List<UnlinkedExecutableBuilder> _value) {
428 assert(!_finished); 428 assert(!_finished);
429 assert(!_json.containsKey("executables")); 429 assert(!_json.containsKey("executables"));
430 if (_value != null || _value.isEmpty) { 430 if (!(_value == null || _value.isEmpty)) {
431 _json["executables"] = _value.map((b) => b.finish()).toList(); 431 _json["executables"] = _value.map((b) => b.finish()).toList();
432 } 432 }
433 } 433 }
434 434
435 void set isAbstract(bool _value) { 435 void set isAbstract(bool _value) {
436 assert(!_finished); 436 assert(!_finished);
437 assert(!_json.containsKey("isAbstract")); 437 assert(!_json.containsKey("isAbstract"));
438 if (_value != null) { 438 if (!(_value == null)) {
439 _json["isAbstract"] = _value; 439 _json["isAbstract"] = _value;
440 } 440 }
441 } 441 }
442 442
443 void set isMixinApplication(bool _value) { 443 void set isMixinApplication(bool _value) {
444 assert(!_finished); 444 assert(!_finished);
445 assert(!_json.containsKey("isMixinApplication")); 445 assert(!_json.containsKey("isMixinApplication"));
446 if (_value != null) { 446 if (!(_value == null)) {
447 _json["isMixinApplication"] = _value; 447 _json["isMixinApplication"] = _value;
448 } 448 }
449 } 449 }
450 450
451 void set hasNoSupertype(bool _value) { 451 void set hasNoSupertype(bool _value) {
452 assert(!_finished); 452 assert(!_finished);
453 assert(!_json.containsKey("hasNoSupertype")); 453 assert(!_json.containsKey("hasNoSupertype"));
454 if (_value != null) { 454 if (!(_value == null)) {
455 _json["hasNoSupertype"] = _value; 455 _json["hasNoSupertype"] = _value;
456 } 456 }
457 } 457 }
458 458
459 Map finish() { 459 Map finish() {
460 assert(!_finished); 460 assert(!_finished);
461 _finished = true; 461 _finished = true;
462 return _json; 462 return _json;
463 } 463 }
464 } 464 }
(...skipping 28 matching lines...) Expand all
493 class UnlinkedCombinatorBuilder { 493 class UnlinkedCombinatorBuilder {
494 final Map _json = {}; 494 final Map _json = {};
495 495
496 bool _finished = false; 496 bool _finished = false;
497 497
498 UnlinkedCombinatorBuilder(builder.BuilderContext context); 498 UnlinkedCombinatorBuilder(builder.BuilderContext context);
499 499
500 void set shows(List<UnlinkedCombinatorNameBuilder> _value) { 500 void set shows(List<UnlinkedCombinatorNameBuilder> _value) {
501 assert(!_finished); 501 assert(!_finished);
502 assert(!_json.containsKey("shows")); 502 assert(!_json.containsKey("shows"));
503 if (_value != null || _value.isEmpty) { 503 if (!(_value == null || _value.isEmpty)) {
504 _json["shows"] = _value.map((b) => b.finish()).toList(); 504 _json["shows"] = _value.map((b) => b.finish()).toList();
505 } 505 }
506 } 506 }
507 507
508 void set hides(List<UnlinkedCombinatorNameBuilder> _value) { 508 void set hides(List<UnlinkedCombinatorNameBuilder> _value) {
509 assert(!_finished); 509 assert(!_finished);
510 assert(!_json.containsKey("hides")); 510 assert(!_json.containsKey("hides"));
511 if (_value != null || _value.isEmpty) { 511 if (!(_value == null || _value.isEmpty)) {
512 _json["hides"] = _value.map((b) => b.finish()).toList(); 512 _json["hides"] = _value.map((b) => b.finish()).toList();
513 } 513 }
514 } 514 }
515 515
516 Map finish() { 516 Map finish() {
517 assert(!_finished); 517 assert(!_finished);
518 _finished = true; 518 _finished = true;
519 return _json; 519 return _json;
520 } 520 }
521 } 521 }
(...skipping 17 matching lines...) Expand all
539 class UnlinkedCombinatorNameBuilder { 539 class UnlinkedCombinatorNameBuilder {
540 final Map _json = {}; 540 final Map _json = {};
541 541
542 bool _finished = false; 542 bool _finished = false;
543 543
544 UnlinkedCombinatorNameBuilder(builder.BuilderContext context); 544 UnlinkedCombinatorNameBuilder(builder.BuilderContext context);
545 545
546 void set name(String _value) { 546 void set name(String _value) {
547 assert(!_finished); 547 assert(!_finished);
548 assert(!_json.containsKey("name")); 548 assert(!_json.containsKey("name"));
549 if (_value != null) { 549 if (!(_value == null)) {
550 _json["name"] = _value; 550 _json["name"] = _value;
551 } 551 }
552 } 552 }
553 553
554 Map finish() { 554 Map finish() {
555 assert(!_finished); 555 assert(!_finished);
556 _finished = true; 556 _finished = true;
557 return _json; 557 return _json;
558 } 558 }
559 } 559 }
(...skipping 19 matching lines...) Expand all
579 class UnlinkedEnumBuilder { 579 class UnlinkedEnumBuilder {
580 final Map _json = {}; 580 final Map _json = {};
581 581
582 bool _finished = false; 582 bool _finished = false;
583 583
584 UnlinkedEnumBuilder(builder.BuilderContext context); 584 UnlinkedEnumBuilder(builder.BuilderContext context);
585 585
586 void set name(String _value) { 586 void set name(String _value) {
587 assert(!_finished); 587 assert(!_finished);
588 assert(!_json.containsKey("name")); 588 assert(!_json.containsKey("name"));
589 if (_value != null) { 589 if (!(_value == null)) {
590 _json["name"] = _value; 590 _json["name"] = _value;
591 } 591 }
592 } 592 }
593 593
594 void set values(List<UnlinkedEnumValueBuilder> _value) { 594 void set values(List<UnlinkedEnumValueBuilder> _value) {
595 assert(!_finished); 595 assert(!_finished);
596 assert(!_json.containsKey("values")); 596 assert(!_json.containsKey("values"));
597 if (_value != null || _value.isEmpty) { 597 if (!(_value == null || _value.isEmpty)) {
598 _json["values"] = _value.map((b) => b.finish()).toList(); 598 _json["values"] = _value.map((b) => b.finish()).toList();
599 } 599 }
600 } 600 }
601 601
602 Map finish() { 602 Map finish() {
603 assert(!_finished); 603 assert(!_finished);
604 _finished = true; 604 _finished = true;
605 return _json; 605 return _json;
606 } 606 }
607 } 607 }
(...skipping 17 matching lines...) Expand all
625 class UnlinkedEnumValueBuilder { 625 class UnlinkedEnumValueBuilder {
626 final Map _json = {}; 626 final Map _json = {};
627 627
628 bool _finished = false; 628 bool _finished = false;
629 629
630 UnlinkedEnumValueBuilder(builder.BuilderContext context); 630 UnlinkedEnumValueBuilder(builder.BuilderContext context);
631 631
632 void set name(String _value) { 632 void set name(String _value) {
633 assert(!_finished); 633 assert(!_finished);
634 assert(!_json.containsKey("name")); 634 assert(!_json.containsKey("name"));
635 if (_value != null) { 635 if (!(_value == null)) {
636 _json["name"] = _value; 636 _json["name"] = _value;
637 } 637 }
638 } 638 }
639 639
640 Map finish() { 640 Map finish() {
641 assert(!_finished); 641 assert(!_finished);
642 _finished = true; 642 _finished = true;
643 return _json; 643 return _json;
644 } 644 }
645 } 645 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 class UnlinkedExecutableBuilder { 692 class UnlinkedExecutableBuilder {
693 final Map _json = {}; 693 final Map _json = {};
694 694
695 bool _finished = false; 695 bool _finished = false;
696 696
697 UnlinkedExecutableBuilder(builder.BuilderContext context); 697 UnlinkedExecutableBuilder(builder.BuilderContext context);
698 698
699 void set name(String _value) { 699 void set name(String _value) {
700 assert(!_finished); 700 assert(!_finished);
701 assert(!_json.containsKey("name")); 701 assert(!_json.containsKey("name"));
702 if (_value != null) { 702 if (!(_value == null)) {
703 _json["name"] = _value; 703 _json["name"] = _value;
704 } 704 }
705 } 705 }
706 706
707 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 707 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
708 assert(!_finished); 708 assert(!_finished);
709 assert(!_json.containsKey("typeParameters")); 709 assert(!_json.containsKey("typeParameters"));
710 if (_value != null || _value.isEmpty) { 710 if (!(_value == null || _value.isEmpty)) {
711 _json["typeParameters"] = _value.map((b) => b.finish()).toList(); 711 _json["typeParameters"] = _value.map((b) => b.finish()).toList();
712 } 712 }
713 } 713 }
714 714
715 void set returnType(UnlinkedTypeRefBuilder _value) { 715 void set returnType(UnlinkedTypeRefBuilder _value) {
716 assert(!_finished); 716 assert(!_finished);
717 assert(!_json.containsKey("returnType")); 717 assert(!_json.containsKey("returnType"));
718 if (_value != null) { 718 if (!(_value == null)) {
719 _json["returnType"] = _value.finish(); 719 _json["returnType"] = _value.finish();
720 } 720 }
721 } 721 }
722 722
723 void set parameters(List<UnlinkedParamBuilder> _value) { 723 void set parameters(List<UnlinkedParamBuilder> _value) {
724 assert(!_finished); 724 assert(!_finished);
725 assert(!_json.containsKey("parameters")); 725 assert(!_json.containsKey("parameters"));
726 if (_value != null || _value.isEmpty) { 726 if (!(_value == null || _value.isEmpty)) {
727 _json["parameters"] = _value.map((b) => b.finish()).toList(); 727 _json["parameters"] = _value.map((b) => b.finish()).toList();
728 } 728 }
729 } 729 }
730 730
731 void set kind(UnlinkedExecutableKind _value) { 731 void set kind(UnlinkedExecutableKind _value) {
732 assert(!_finished); 732 assert(!_finished);
733 assert(!_json.containsKey("kind")); 733 assert(!_json.containsKey("kind"));
734 if (_value != null || _value == UnlinkedExecutableKind.functionOrMethod) { 734 if (!(_value == null || _value == UnlinkedExecutableKind.functionOrMethod)) {
735 _json["kind"] = _value.index; 735 _json["kind"] = _value.index;
736 } 736 }
737 } 737 }
738 738
739 void set isAbstract(bool _value) { 739 void set isAbstract(bool _value) {
740 assert(!_finished); 740 assert(!_finished);
741 assert(!_json.containsKey("isAbstract")); 741 assert(!_json.containsKey("isAbstract"));
742 if (_value != null) { 742 if (!(_value == null)) {
743 _json["isAbstract"] = _value; 743 _json["isAbstract"] = _value;
744 } 744 }
745 } 745 }
746 746
747 void set isStatic(bool _value) { 747 void set isStatic(bool _value) {
748 assert(!_finished); 748 assert(!_finished);
749 assert(!_json.containsKey("isStatic")); 749 assert(!_json.containsKey("isStatic"));
750 if (_value != null) { 750 if (!(_value == null)) {
751 _json["isStatic"] = _value; 751 _json["isStatic"] = _value;
752 } 752 }
753 } 753 }
754 754
755 void set isConst(bool _value) { 755 void set isConst(bool _value) {
756 assert(!_finished); 756 assert(!_finished);
757 assert(!_json.containsKey("isConst")); 757 assert(!_json.containsKey("isConst"));
758 if (_value != null) { 758 if (!(_value == null)) {
759 _json["isConst"] = _value; 759 _json["isConst"] = _value;
760 } 760 }
761 } 761 }
762 762
763 void set isFactory(bool _value) { 763 void set isFactory(bool _value) {
764 assert(!_finished); 764 assert(!_finished);
765 assert(!_json.containsKey("isFactory")); 765 assert(!_json.containsKey("isFactory"));
766 if (_value != null) { 766 if (!(_value == null)) {
767 _json["isFactory"] = _value; 767 _json["isFactory"] = _value;
768 } 768 }
769 } 769 }
770 770
771 void set hasImplicitReturnType(bool _value) { 771 void set hasImplicitReturnType(bool _value) {
772 assert(!_finished); 772 assert(!_finished);
773 assert(!_json.containsKey("hasImplicitReturnType")); 773 assert(!_json.containsKey("hasImplicitReturnType"));
774 if (_value != null) { 774 if (!(_value == null)) {
775 _json["hasImplicitReturnType"] = _value; 775 _json["hasImplicitReturnType"] = _value;
776 } 776 }
777 } 777 }
778 778
779 void set isExternal(bool _value) { 779 void set isExternal(bool _value) {
780 assert(!_finished); 780 assert(!_finished);
781 assert(!_json.containsKey("isExternal")); 781 assert(!_json.containsKey("isExternal"));
782 if (_value != null) { 782 if (!(_value == null)) {
783 _json["isExternal"] = _value; 783 _json["isExternal"] = _value;
784 } 784 }
785 } 785 }
786 786
787 Map finish() { 787 Map finish() {
788 assert(!_finished); 788 assert(!_finished);
789 _finished = true; 789 _finished = true;
790 return _json; 790 return _json;
791 } 791 }
792 } 792 }
(...skipping 29 matching lines...) Expand all
822 class UnlinkedExportBuilder { 822 class UnlinkedExportBuilder {
823 final Map _json = {}; 823 final Map _json = {};
824 824
825 bool _finished = false; 825 bool _finished = false;
826 826
827 UnlinkedExportBuilder(builder.BuilderContext context); 827 UnlinkedExportBuilder(builder.BuilderContext context);
828 828
829 void set uri(String _value) { 829 void set uri(String _value) {
830 assert(!_finished); 830 assert(!_finished);
831 assert(!_json.containsKey("uri")); 831 assert(!_json.containsKey("uri"));
832 if (_value != null) { 832 if (!(_value == null)) {
833 _json["uri"] = _value; 833 _json["uri"] = _value;
834 } 834 }
835 } 835 }
836 836
837 void set combinators(List<UnlinkedCombinatorBuilder> _value) { 837 void set combinators(List<UnlinkedCombinatorBuilder> _value) {
838 assert(!_finished); 838 assert(!_finished);
839 assert(!_json.containsKey("combinators")); 839 assert(!_json.containsKey("combinators"));
840 if (_value != null || _value.isEmpty) { 840 if (!(_value == null || _value.isEmpty)) {
841 _json["combinators"] = _value.map((b) => b.finish()).toList(); 841 _json["combinators"] = _value.map((b) => b.finish()).toList();
842 } 842 }
843 } 843 }
844 844
845 Map finish() { 845 Map finish() {
846 assert(!_finished); 846 assert(!_finished);
847 _finished = true; 847 _finished = true;
848 return _json; 848 return _json;
849 } 849 }
850 } 850 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 class UnlinkedImportBuilder { 883 class UnlinkedImportBuilder {
884 final Map _json = {}; 884 final Map _json = {};
885 885
886 bool _finished = false; 886 bool _finished = false;
887 887
888 UnlinkedImportBuilder(builder.BuilderContext context); 888 UnlinkedImportBuilder(builder.BuilderContext context);
889 889
890 void set uri(String _value) { 890 void set uri(String _value) {
891 assert(!_finished); 891 assert(!_finished);
892 assert(!_json.containsKey("uri")); 892 assert(!_json.containsKey("uri"));
893 if (_value != null) { 893 if (!(_value == null)) {
894 _json["uri"] = _value; 894 _json["uri"] = _value;
895 } 895 }
896 } 896 }
897 897
898 void set offset(int _value) { 898 void set offset(int _value) {
899 assert(!_finished); 899 assert(!_finished);
900 assert(!_json.containsKey("offset")); 900 assert(!_json.containsKey("offset"));
901 if (_value != null) { 901 if (!(_value == null)) {
902 _json["offset"] = _value; 902 _json["offset"] = _value;
903 } 903 }
904 } 904 }
905 905
906 void set prefixReference(int _value) { 906 void set prefixReference(int _value) {
907 assert(!_finished); 907 assert(!_finished);
908 assert(!_json.containsKey("prefixReference")); 908 assert(!_json.containsKey("prefixReference"));
909 if (_value != null) { 909 if (!(_value == null)) {
910 _json["prefixReference"] = _value; 910 _json["prefixReference"] = _value;
911 } 911 }
912 } 912 }
913 913
914 void set combinators(List<UnlinkedCombinatorBuilder> _value) { 914 void set combinators(List<UnlinkedCombinatorBuilder> _value) {
915 assert(!_finished); 915 assert(!_finished);
916 assert(!_json.containsKey("combinators")); 916 assert(!_json.containsKey("combinators"));
917 if (_value != null || _value.isEmpty) { 917 if (!(_value == null || _value.isEmpty)) {
918 _json["combinators"] = _value.map((b) => b.finish()).toList(); 918 _json["combinators"] = _value.map((b) => b.finish()).toList();
919 } 919 }
920 } 920 }
921 921
922 void set isDeferred(bool _value) { 922 void set isDeferred(bool _value) {
923 assert(!_finished); 923 assert(!_finished);
924 assert(!_json.containsKey("isDeferred")); 924 assert(!_json.containsKey("isDeferred"));
925 if (_value != null) { 925 if (!(_value == null)) {
926 _json["isDeferred"] = _value; 926 _json["isDeferred"] = _value;
927 } 927 }
928 } 928 }
929 929
930 void set isImplicit(bool _value) { 930 void set isImplicit(bool _value) {
931 assert(!_finished); 931 assert(!_finished);
932 assert(!_json.containsKey("isImplicit")); 932 assert(!_json.containsKey("isImplicit"));
933 if (_value != null) { 933 if (!(_value == null)) {
934 _json["isImplicit"] = _value; 934 _json["isImplicit"] = _value;
935 } 935 }
936 } 936 }
937 937
938 Map finish() { 938 Map finish() {
939 assert(!_finished); 939 assert(!_finished);
940 _finished = true; 940 _finished = true;
941 return _json; 941 return _json;
942 } 942 }
943 } 943 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 class UnlinkedParamBuilder { 983 class UnlinkedParamBuilder {
984 final Map _json = {}; 984 final Map _json = {};
985 985
986 bool _finished = false; 986 bool _finished = false;
987 987
988 UnlinkedParamBuilder(builder.BuilderContext context); 988 UnlinkedParamBuilder(builder.BuilderContext context);
989 989
990 void set name(String _value) { 990 void set name(String _value) {
991 assert(!_finished); 991 assert(!_finished);
992 assert(!_json.containsKey("name")); 992 assert(!_json.containsKey("name"));
993 if (_value != null) { 993 if (!(_value == null)) {
994 _json["name"] = _value; 994 _json["name"] = _value;
995 } 995 }
996 } 996 }
997 997
998 void set type(UnlinkedTypeRefBuilder _value) { 998 void set type(UnlinkedTypeRefBuilder _value) {
999 assert(!_finished); 999 assert(!_finished);
1000 assert(!_json.containsKey("type")); 1000 assert(!_json.containsKey("type"));
1001 if (_value != null) { 1001 if (!(_value == null)) {
1002 _json["type"] = _value.finish(); 1002 _json["type"] = _value.finish();
1003 } 1003 }
1004 } 1004 }
1005 1005
1006 void set parameters(List<UnlinkedParamBuilder> _value) { 1006 void set parameters(List<UnlinkedParamBuilder> _value) {
1007 assert(!_finished); 1007 assert(!_finished);
1008 assert(!_json.containsKey("parameters")); 1008 assert(!_json.containsKey("parameters"));
1009 if (_value != null || _value.isEmpty) { 1009 if (!(_value == null || _value.isEmpty)) {
1010 _json["parameters"] = _value.map((b) => b.finish()).toList(); 1010 _json["parameters"] = _value.map((b) => b.finish()).toList();
1011 } 1011 }
1012 } 1012 }
1013 1013
1014 void set kind(UnlinkedParamKind _value) { 1014 void set kind(UnlinkedParamKind _value) {
1015 assert(!_finished); 1015 assert(!_finished);
1016 assert(!_json.containsKey("kind")); 1016 assert(!_json.containsKey("kind"));
1017 if (_value != null || _value == UnlinkedParamKind.required) { 1017 if (!(_value == null || _value == UnlinkedParamKind.required)) {
1018 _json["kind"] = _value.index; 1018 _json["kind"] = _value.index;
1019 } 1019 }
1020 } 1020 }
1021 1021
1022 void set isFunctionTyped(bool _value) { 1022 void set isFunctionTyped(bool _value) {
1023 assert(!_finished); 1023 assert(!_finished);
1024 assert(!_json.containsKey("isFunctionTyped")); 1024 assert(!_json.containsKey("isFunctionTyped"));
1025 if (_value != null) { 1025 if (!(_value == null)) {
1026 _json["isFunctionTyped"] = _value; 1026 _json["isFunctionTyped"] = _value;
1027 } 1027 }
1028 } 1028 }
1029 1029
1030 void set isInitializingFormal(bool _value) { 1030 void set isInitializingFormal(bool _value) {
1031 assert(!_finished); 1031 assert(!_finished);
1032 assert(!_json.containsKey("isInitializingFormal")); 1032 assert(!_json.containsKey("isInitializingFormal"));
1033 if (_value != null) { 1033 if (!(_value == null)) {
1034 _json["isInitializingFormal"] = _value; 1034 _json["isInitializingFormal"] = _value;
1035 } 1035 }
1036 } 1036 }
1037 1037
1038 void set hasImplicitType(bool _value) { 1038 void set hasImplicitType(bool _value) {
1039 assert(!_finished); 1039 assert(!_finished);
1040 assert(!_json.containsKey("hasImplicitType")); 1040 assert(!_json.containsKey("hasImplicitType"));
1041 if (_value != null) { 1041 if (!(_value == null)) {
1042 _json["hasImplicitType"] = _value; 1042 _json["hasImplicitType"] = _value;
1043 } 1043 }
1044 } 1044 }
1045 1045
1046 Map finish() { 1046 Map finish() {
1047 assert(!_finished); 1047 assert(!_finished);
1048 _finished = true; 1048 _finished = true;
1049 return _json; 1049 return _json;
1050 } 1050 }
1051 } 1051 }
(...skipping 22 matching lines...) Expand all
1074 class UnlinkedPartBuilder { 1074 class UnlinkedPartBuilder {
1075 final Map _json = {}; 1075 final Map _json = {};
1076 1076
1077 bool _finished = false; 1077 bool _finished = false;
1078 1078
1079 UnlinkedPartBuilder(builder.BuilderContext context); 1079 UnlinkedPartBuilder(builder.BuilderContext context);
1080 1080
1081 void set uri(String _value) { 1081 void set uri(String _value) {
1082 assert(!_finished); 1082 assert(!_finished);
1083 assert(!_json.containsKey("uri")); 1083 assert(!_json.containsKey("uri"));
1084 if (_value != null) { 1084 if (!(_value == null)) {
1085 _json["uri"] = _value; 1085 _json["uri"] = _value;
1086 } 1086 }
1087 } 1087 }
1088 1088
1089 Map finish() { 1089 Map finish() {
1090 assert(!_finished); 1090 assert(!_finished);
1091 _finished = true; 1091 _finished = true;
1092 return _json; 1092 return _json;
1093 } 1093 }
1094 } 1094 }
(...skipping 19 matching lines...) Expand all
1114 class UnlinkedReferenceBuilder { 1114 class UnlinkedReferenceBuilder {
1115 final Map _json = {}; 1115 final Map _json = {};
1116 1116
1117 bool _finished = false; 1117 bool _finished = false;
1118 1118
1119 UnlinkedReferenceBuilder(builder.BuilderContext context); 1119 UnlinkedReferenceBuilder(builder.BuilderContext context);
1120 1120
1121 void set name(String _value) { 1121 void set name(String _value) {
1122 assert(!_finished); 1122 assert(!_finished);
1123 assert(!_json.containsKey("name")); 1123 assert(!_json.containsKey("name"));
1124 if (_value != null) { 1124 if (!(_value == null)) {
1125 _json["name"] = _value; 1125 _json["name"] = _value;
1126 } 1126 }
1127 } 1127 }
1128 1128
1129 void set prefixReference(int _value) { 1129 void set prefixReference(int _value) {
1130 assert(!_finished); 1130 assert(!_finished);
1131 assert(!_json.containsKey("prefixReference")); 1131 assert(!_json.containsKey("prefixReference"));
1132 if (_value != null) { 1132 if (!(_value == null)) {
1133 _json["prefixReference"] = _value; 1133 _json["prefixReference"] = _value;
1134 } 1134 }
1135 } 1135 }
1136 1136
1137 Map finish() { 1137 Map finish() {
1138 assert(!_finished); 1138 assert(!_finished);
1139 _finished = true; 1139 _finished = true;
1140 return _json; 1140 return _json;
1141 } 1141 }
1142 } 1142 }
(...skipping 26 matching lines...) Expand all
1169 class UnlinkedTypedefBuilder { 1169 class UnlinkedTypedefBuilder {
1170 final Map _json = {}; 1170 final Map _json = {};
1171 1171
1172 bool _finished = false; 1172 bool _finished = false;
1173 1173
1174 UnlinkedTypedefBuilder(builder.BuilderContext context); 1174 UnlinkedTypedefBuilder(builder.BuilderContext context);
1175 1175
1176 void set name(String _value) { 1176 void set name(String _value) {
1177 assert(!_finished); 1177 assert(!_finished);
1178 assert(!_json.containsKey("name")); 1178 assert(!_json.containsKey("name"));
1179 if (_value != null) { 1179 if (!(_value == null)) {
1180 _json["name"] = _value; 1180 _json["name"] = _value;
1181 } 1181 }
1182 } 1182 }
1183 1183
1184 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 1184 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
1185 assert(!_finished); 1185 assert(!_finished);
1186 assert(!_json.containsKey("typeParameters")); 1186 assert(!_json.containsKey("typeParameters"));
1187 if (_value != null || _value.isEmpty) { 1187 if (!(_value == null || _value.isEmpty)) {
1188 _json["typeParameters"] = _value.map((b) => b.finish()).toList(); 1188 _json["typeParameters"] = _value.map((b) => b.finish()).toList();
1189 } 1189 }
1190 } 1190 }
1191 1191
1192 void set returnType(UnlinkedTypeRefBuilder _value) { 1192 void set returnType(UnlinkedTypeRefBuilder _value) {
1193 assert(!_finished); 1193 assert(!_finished);
1194 assert(!_json.containsKey("returnType")); 1194 assert(!_json.containsKey("returnType"));
1195 if (_value != null) { 1195 if (!(_value == null)) {
1196 _json["returnType"] = _value.finish(); 1196 _json["returnType"] = _value.finish();
1197 } 1197 }
1198 } 1198 }
1199 1199
1200 void set parameters(List<UnlinkedParamBuilder> _value) { 1200 void set parameters(List<UnlinkedParamBuilder> _value) {
1201 assert(!_finished); 1201 assert(!_finished);
1202 assert(!_json.containsKey("parameters")); 1202 assert(!_json.containsKey("parameters"));
1203 if (_value != null || _value.isEmpty) { 1203 if (!(_value == null || _value.isEmpty)) {
1204 _json["parameters"] = _value.map((b) => b.finish()).toList(); 1204 _json["parameters"] = _value.map((b) => b.finish()).toList();
1205 } 1205 }
1206 } 1206 }
1207 1207
1208 Map finish() { 1208 Map finish() {
1209 assert(!_finished); 1209 assert(!_finished);
1210 _finished = true; 1210 _finished = true;
1211 return _json; 1211 return _json;
1212 } 1212 }
1213 } 1213 }
(...skipping 22 matching lines...) Expand all
1236 class UnlinkedTypeParamBuilder { 1236 class UnlinkedTypeParamBuilder {
1237 final Map _json = {}; 1237 final Map _json = {};
1238 1238
1239 bool _finished = false; 1239 bool _finished = false;
1240 1240
1241 UnlinkedTypeParamBuilder(builder.BuilderContext context); 1241 UnlinkedTypeParamBuilder(builder.BuilderContext context);
1242 1242
1243 void set name(String _value) { 1243 void set name(String _value) {
1244 assert(!_finished); 1244 assert(!_finished);
1245 assert(!_json.containsKey("name")); 1245 assert(!_json.containsKey("name"));
1246 if (_value != null) { 1246 if (!(_value == null)) {
1247 _json["name"] = _value; 1247 _json["name"] = _value;
1248 } 1248 }
1249 } 1249 }
1250 1250
1251 void set bound(UnlinkedTypeRefBuilder _value) { 1251 void set bound(UnlinkedTypeRefBuilder _value) {
1252 assert(!_finished); 1252 assert(!_finished);
1253 assert(!_json.containsKey("bound")); 1253 assert(!_json.containsKey("bound"));
1254 if (_value != null) { 1254 if (!(_value == null)) {
1255 _json["bound"] = _value.finish(); 1255 _json["bound"] = _value.finish();
1256 } 1256 }
1257 } 1257 }
1258 1258
1259 Map finish() { 1259 Map finish() {
1260 assert(!_finished); 1260 assert(!_finished);
1261 _finished = true; 1261 _finished = true;
1262 return _json; 1262 return _json;
1263 } 1263 }
1264 } 1264 }
(...skipping 23 matching lines...) Expand all
1288 class UnlinkedTypeRefBuilder { 1288 class UnlinkedTypeRefBuilder {
1289 final Map _json = {}; 1289 final Map _json = {};
1290 1290
1291 bool _finished = false; 1291 bool _finished = false;
1292 1292
1293 UnlinkedTypeRefBuilder(builder.BuilderContext context); 1293 UnlinkedTypeRefBuilder(builder.BuilderContext context);
1294 1294
1295 void set reference(int _value) { 1295 void set reference(int _value) {
1296 assert(!_finished); 1296 assert(!_finished);
1297 assert(!_json.containsKey("reference")); 1297 assert(!_json.containsKey("reference"));
1298 if (_value != null) { 1298 if (!(_value == null)) {
1299 _json["reference"] = _value; 1299 _json["reference"] = _value;
1300 } 1300 }
1301 } 1301 }
1302 1302
1303 void set paramReference(int _value) { 1303 void set paramReference(int _value) {
1304 assert(!_finished); 1304 assert(!_finished);
1305 assert(!_json.containsKey("paramReference")); 1305 assert(!_json.containsKey("paramReference"));
1306 if (_value != null) { 1306 if (!(_value == null)) {
1307 _json["paramReference"] = _value; 1307 _json["paramReference"] = _value;
1308 } 1308 }
1309 } 1309 }
1310 1310
1311 void set typeArguments(List<UnlinkedTypeRefBuilder> _value) { 1311 void set typeArguments(List<UnlinkedTypeRefBuilder> _value) {
1312 assert(!_finished); 1312 assert(!_finished);
1313 assert(!_json.containsKey("typeArguments")); 1313 assert(!_json.containsKey("typeArguments"));
1314 if (_value != null || _value.isEmpty) { 1314 if (!(_value == null || _value.isEmpty)) {
1315 _json["typeArguments"] = _value.map((b) => b.finish()).toList(); 1315 _json["typeArguments"] = _value.map((b) => b.finish()).toList();
1316 } 1316 }
1317 } 1317 }
1318 1318
1319 Map finish() { 1319 Map finish() {
1320 assert(!_finished); 1320 assert(!_finished);
1321 _finished = true; 1321 _finished = true;
1322 return _json; 1322 return _json;
1323 } 1323 }
1324 } 1324 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 class UnlinkedUnitBuilder { 1372 class UnlinkedUnitBuilder {
1373 final Map _json = {}; 1373 final Map _json = {};
1374 1374
1375 bool _finished = false; 1375 bool _finished = false;
1376 1376
1377 UnlinkedUnitBuilder(builder.BuilderContext context); 1377 UnlinkedUnitBuilder(builder.BuilderContext context);
1378 1378
1379 void set libraryName(String _value) { 1379 void set libraryName(String _value) {
1380 assert(!_finished); 1380 assert(!_finished);
1381 assert(!_json.containsKey("libraryName")); 1381 assert(!_json.containsKey("libraryName"));
1382 if (_value != null) { 1382 if (!(_value == null)) {
1383 _json["libraryName"] = _value; 1383 _json["libraryName"] = _value;
1384 } 1384 }
1385 } 1385 }
1386 1386
1387 void set references(List<UnlinkedReferenceBuilder> _value) { 1387 void set references(List<UnlinkedReferenceBuilder> _value) {
1388 assert(!_finished); 1388 assert(!_finished);
1389 assert(!_json.containsKey("references")); 1389 assert(!_json.containsKey("references"));
1390 if (_value != null || _value.isEmpty) { 1390 if (!(_value == null || _value.isEmpty)) {
1391 _json["references"] = _value.map((b) => b.finish()).toList(); 1391 _json["references"] = _value.map((b) => b.finish()).toList();
1392 } 1392 }
1393 } 1393 }
1394 1394
1395 void set classes(List<UnlinkedClassBuilder> _value) { 1395 void set classes(List<UnlinkedClassBuilder> _value) {
1396 assert(!_finished); 1396 assert(!_finished);
1397 assert(!_json.containsKey("classes")); 1397 assert(!_json.containsKey("classes"));
1398 if (_value != null || _value.isEmpty) { 1398 if (!(_value == null || _value.isEmpty)) {
1399 _json["classes"] = _value.map((b) => b.finish()).toList(); 1399 _json["classes"] = _value.map((b) => b.finish()).toList();
1400 } 1400 }
1401 } 1401 }
1402 1402
1403 void set enums(List<UnlinkedEnumBuilder> _value) { 1403 void set enums(List<UnlinkedEnumBuilder> _value) {
1404 assert(!_finished); 1404 assert(!_finished);
1405 assert(!_json.containsKey("enums")); 1405 assert(!_json.containsKey("enums"));
1406 if (_value != null || _value.isEmpty) { 1406 if (!(_value == null || _value.isEmpty)) {
1407 _json["enums"] = _value.map((b) => b.finish()).toList(); 1407 _json["enums"] = _value.map((b) => b.finish()).toList();
1408 } 1408 }
1409 } 1409 }
1410 1410
1411 void set executables(List<UnlinkedExecutableBuilder> _value) { 1411 void set executables(List<UnlinkedExecutableBuilder> _value) {
1412 assert(!_finished); 1412 assert(!_finished);
1413 assert(!_json.containsKey("executables")); 1413 assert(!_json.containsKey("executables"));
1414 if (_value != null || _value.isEmpty) { 1414 if (!(_value == null || _value.isEmpty)) {
1415 _json["executables"] = _value.map((b) => b.finish()).toList(); 1415 _json["executables"] = _value.map((b) => b.finish()).toList();
1416 } 1416 }
1417 } 1417 }
1418 1418
1419 void set exports(List<UnlinkedExportBuilder> _value) { 1419 void set exports(List<UnlinkedExportBuilder> _value) {
1420 assert(!_finished); 1420 assert(!_finished);
1421 assert(!_json.containsKey("exports")); 1421 assert(!_json.containsKey("exports"));
1422 if (_value != null || _value.isEmpty) { 1422 if (!(_value == null || _value.isEmpty)) {
1423 _json["exports"] = _value.map((b) => b.finish()).toList(); 1423 _json["exports"] = _value.map((b) => b.finish()).toList();
1424 } 1424 }
1425 } 1425 }
1426 1426
1427 void set imports(List<UnlinkedImportBuilder> _value) { 1427 void set imports(List<UnlinkedImportBuilder> _value) {
1428 assert(!_finished); 1428 assert(!_finished);
1429 assert(!_json.containsKey("imports")); 1429 assert(!_json.containsKey("imports"));
1430 if (_value != null || _value.isEmpty) { 1430 if (!(_value == null || _value.isEmpty)) {
1431 _json["imports"] = _value.map((b) => b.finish()).toList(); 1431 _json["imports"] = _value.map((b) => b.finish()).toList();
1432 } 1432 }
1433 } 1433 }
1434 1434
1435 void set parts(List<UnlinkedPartBuilder> _value) { 1435 void set parts(List<UnlinkedPartBuilder> _value) {
1436 assert(!_finished); 1436 assert(!_finished);
1437 assert(!_json.containsKey("parts")); 1437 assert(!_json.containsKey("parts"));
1438 if (_value != null || _value.isEmpty) { 1438 if (!(_value == null || _value.isEmpty)) {
1439 _json["parts"] = _value.map((b) => b.finish()).toList(); 1439 _json["parts"] = _value.map((b) => b.finish()).toList();
1440 } 1440 }
1441 } 1441 }
1442 1442
1443 void set typedefs(List<UnlinkedTypedefBuilder> _value) { 1443 void set typedefs(List<UnlinkedTypedefBuilder> _value) {
1444 assert(!_finished); 1444 assert(!_finished);
1445 assert(!_json.containsKey("typedefs")); 1445 assert(!_json.containsKey("typedefs"));
1446 if (_value != null || _value.isEmpty) { 1446 if (!(_value == null || _value.isEmpty)) {
1447 _json["typedefs"] = _value.map((b) => b.finish()).toList(); 1447 _json["typedefs"] = _value.map((b) => b.finish()).toList();
1448 } 1448 }
1449 } 1449 }
1450 1450
1451 void set variables(List<UnlinkedVariableBuilder> _value) { 1451 void set variables(List<UnlinkedVariableBuilder> _value) {
1452 assert(!_finished); 1452 assert(!_finished);
1453 assert(!_json.containsKey("variables")); 1453 assert(!_json.containsKey("variables"));
1454 if (_value != null || _value.isEmpty) { 1454 if (!(_value == null || _value.isEmpty)) {
1455 _json["variables"] = _value.map((b) => b.finish()).toList(); 1455 _json["variables"] = _value.map((b) => b.finish()).toList();
1456 } 1456 }
1457 } 1457 }
1458 1458
1459 List<int> toBuffer() => UTF8.encode(JSON.encode(finish())); 1459 List<int> toBuffer() => UTF8.encode(JSON.encode(finish()));
1460 1460
1461 Map finish() { 1461 Map finish() {
1462 assert(!_finished); 1462 assert(!_finished);
1463 _finished = true; 1463 _finished = true;
1464 return _json; 1464 return _json;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 class UnlinkedVariableBuilder { 1507 class UnlinkedVariableBuilder {
1508 final Map _json = {}; 1508 final Map _json = {};
1509 1509
1510 bool _finished = false; 1510 bool _finished = false;
1511 1511
1512 UnlinkedVariableBuilder(builder.BuilderContext context); 1512 UnlinkedVariableBuilder(builder.BuilderContext context);
1513 1513
1514 void set name(String _value) { 1514 void set name(String _value) {
1515 assert(!_finished); 1515 assert(!_finished);
1516 assert(!_json.containsKey("name")); 1516 assert(!_json.containsKey("name"));
1517 if (_value != null) { 1517 if (!(_value == null)) {
1518 _json["name"] = _value; 1518 _json["name"] = _value;
1519 } 1519 }
1520 } 1520 }
1521 1521
1522 void set type(UnlinkedTypeRefBuilder _value) { 1522 void set type(UnlinkedTypeRefBuilder _value) {
1523 assert(!_finished); 1523 assert(!_finished);
1524 assert(!_json.containsKey("type")); 1524 assert(!_json.containsKey("type"));
1525 if (_value != null) { 1525 if (!(_value == null)) {
1526 _json["type"] = _value.finish(); 1526 _json["type"] = _value.finish();
1527 } 1527 }
1528 } 1528 }
1529 1529
1530 void set isStatic(bool _value) { 1530 void set isStatic(bool _value) {
1531 assert(!_finished); 1531 assert(!_finished);
1532 assert(!_json.containsKey("isStatic")); 1532 assert(!_json.containsKey("isStatic"));
1533 if (_value != null) { 1533 if (!(_value == null)) {
1534 _json["isStatic"] = _value; 1534 _json["isStatic"] = _value;
1535 } 1535 }
1536 } 1536 }
1537 1537
1538 void set isFinal(bool _value) { 1538 void set isFinal(bool _value) {
1539 assert(!_finished); 1539 assert(!_finished);
1540 assert(!_json.containsKey("isFinal")); 1540 assert(!_json.containsKey("isFinal"));
1541 if (_value != null) { 1541 if (!(_value == null)) {
1542 _json["isFinal"] = _value; 1542 _json["isFinal"] = _value;
1543 } 1543 }
1544 } 1544 }
1545 1545
1546 void set isConst(bool _value) { 1546 void set isConst(bool _value) {
1547 assert(!_finished); 1547 assert(!_finished);
1548 assert(!_json.containsKey("isConst")); 1548 assert(!_json.containsKey("isConst"));
1549 if (_value != null) { 1549 if (!(_value == null)) {
1550 _json["isConst"] = _value; 1550 _json["isConst"] = _value;
1551 } 1551 }
1552 } 1552 }
1553 1553
1554 void set hasImplicitType(bool _value) { 1554 void set hasImplicitType(bool _value) {
1555 assert(!_finished); 1555 assert(!_finished);
1556 assert(!_json.containsKey("hasImplicitType")); 1556 assert(!_json.containsKey("hasImplicitType"));
1557 if (_value != null) { 1557 if (!(_value == null)) {
1558 _json["hasImplicitType"] = _value; 1558 _json["hasImplicitType"] = _value;
1559 } 1559 }
1560 } 1560 }
1561 1561
1562 Map finish() { 1562 Map finish() {
1563 assert(!_finished); 1563 assert(!_finished);
1564 _finished = true; 1564 _finished = true;
1565 return _json; 1565 return _json;
1566 } 1566 }
1567 } 1567 }
1568 1568
1569 UnlinkedVariableBuilder encodeUnlinkedVariable(builder.BuilderContext builderCon text, {String name, UnlinkedTypeRefBuilder type, bool isStatic, bool isFinal, bo ol isConst, bool hasImplicitType}) { 1569 UnlinkedVariableBuilder encodeUnlinkedVariable(builder.BuilderContext builderCon text, {String name, UnlinkedTypeRefBuilder type, bool isStatic, bool isFinal, bo ol isConst, bool hasImplicitType}) {
1570 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); 1570 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext);
1571 builder.name = name; 1571 builder.name = name;
1572 builder.type = type; 1572 builder.type = type;
1573 builder.isStatic = isStatic; 1573 builder.isStatic = isStatic;
1574 builder.isFinal = isFinal; 1574 builder.isFinal = isFinal;
1575 builder.isConst = isConst; 1575 builder.isConst = isConst;
1576 builder.hasImplicitType = hasImplicitType; 1576 builder.hasImplicitType = hasImplicitType;
1577 return builder; 1577 return builder;
1578 } 1578 }
1579 1579
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/tool/summary/generate.dart » ('j') | pkg/analyzer/tool/summary/generate.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698