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

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

Issue 1559963002: Use List<String> for combinators in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 builder.interfaces = interfaces; 493 builder.interfaces = interfaces;
494 builder.fields = fields; 494 builder.fields = fields;
495 builder.executables = executables; 495 builder.executables = executables;
496 builder.isAbstract = isAbstract; 496 builder.isAbstract = isAbstract;
497 builder.isMixinApplication = isMixinApplication; 497 builder.isMixinApplication = isMixinApplication;
498 builder.hasNoSupertype = hasNoSupertype; 498 builder.hasNoSupertype = hasNoSupertype;
499 return builder; 499 return builder;
500 } 500 }
501 501
502 class UnlinkedCombinator extends base.SummaryClass { 502 class UnlinkedCombinator extends base.SummaryClass {
503 List<UnlinkedCombinatorName> _shows; 503 List<String> _shows;
504 List<UnlinkedCombinatorName> _hides; 504 List<String> _hides;
505 505
506 UnlinkedCombinator.fromJson(Map json) 506 UnlinkedCombinator.fromJson(Map json)
507 : _shows = json["shows"]?.map((x) => new UnlinkedCombinatorName.fromJson(x)) ?.toList(), 507 : _shows = json["shows"],
508 _hides = json["hides"]?.map((x) => new UnlinkedCombinatorName.fromJson(x)) ?.toList(); 508 _hides = json["hides"];
509 509
510 @override 510 @override
511 Map<String, Object> toMap() => { 511 Map<String, Object> toMap() => {
512 "shows": shows, 512 "shows": shows,
513 "hides": hides, 513 "hides": hides,
514 }; 514 };
515 515
516 List<UnlinkedCombinatorName> get shows => _shows ?? const <UnlinkedCombinatorN ame>[]; 516 List<String> get shows => _shows ?? const <String>[];
517 List<UnlinkedCombinatorName> get hides => _hides ?? const <UnlinkedCombinatorN ame>[]; 517 List<String> get hides => _hides ?? const <String>[];
518 } 518 }
519 519
520 class UnlinkedCombinatorBuilder { 520 class UnlinkedCombinatorBuilder {
521 final Map _json = {}; 521 final Map _json = {};
522 522
523 bool _finished = false; 523 bool _finished = false;
524 524
525 UnlinkedCombinatorBuilder(base.BuilderContext context); 525 UnlinkedCombinatorBuilder(base.BuilderContext context);
526 526
527 void set shows(List<UnlinkedCombinatorNameBuilder> _value) { 527 void set shows(List<String> _value) {
528 assert(!_finished); 528 assert(!_finished);
529 assert(!_json.containsKey("shows")); 529 assert(!_json.containsKey("shows"));
530 if (!(_value == null || _value.isEmpty)) { 530 if (!(_value == null || _value.isEmpty)) {
531 _json["shows"] = _value.map((b) => b.finish()).toList(); 531 _json["shows"] = _value.toList();
532 } 532 }
533 } 533 }
534 534
535 void set hides(List<UnlinkedCombinatorNameBuilder> _value) { 535 void set hides(List<String> _value) {
536 assert(!_finished); 536 assert(!_finished);
537 assert(!_json.containsKey("hides")); 537 assert(!_json.containsKey("hides"));
538 if (!(_value == null || _value.isEmpty)) { 538 if (!(_value == null || _value.isEmpty)) {
539 _json["hides"] = _value.map((b) => b.finish()).toList(); 539 _json["hides"] = _value.toList();
540 } 540 }
541 } 541 }
542 542
543 Map finish() { 543 Map finish() {
544 assert(!_finished); 544 assert(!_finished);
545 _finished = true; 545 _finished = true;
546 return _json; 546 return _json;
547 } 547 }
548 } 548 }
549 549
550 UnlinkedCombinatorBuilder encodeUnlinkedCombinator(base.BuilderContext builderCo ntext, {List<UnlinkedCombinatorNameBuilder> shows, List<UnlinkedCombinatorNameBu ilder> hides}) { 550 UnlinkedCombinatorBuilder encodeUnlinkedCombinator(base.BuilderContext builderCo ntext, {List<String> shows, List<String> hides}) {
551 UnlinkedCombinatorBuilder builder = new UnlinkedCombinatorBuilder(builderConte xt); 551 UnlinkedCombinatorBuilder builder = new UnlinkedCombinatorBuilder(builderConte xt);
552 builder.shows = shows; 552 builder.shows = shows;
553 builder.hides = hides; 553 builder.hides = hides;
554 return builder; 554 return builder;
555 } 555 }
556 556
557 class UnlinkedCombinatorName extends base.SummaryClass {
558 String _name;
559
560 UnlinkedCombinatorName.fromJson(Map json)
561 : _name = json["name"];
562
563 @override
564 Map<String, Object> toMap() => {
565 "name": name,
566 };
567
568 String get name => _name ?? '';
569 }
570
571 class UnlinkedCombinatorNameBuilder {
572 final Map _json = {};
573
574 bool _finished = false;
575
576 UnlinkedCombinatorNameBuilder(base.BuilderContext context);
577
578 void set name(String _value) {
579 assert(!_finished);
580 assert(!_json.containsKey("name"));
581 if (_value != null) {
582 _json["name"] = _value;
583 }
584 }
585
586 Map finish() {
587 assert(!_finished);
588 _finished = true;
589 return _json;
590 }
591 }
592
593 UnlinkedCombinatorNameBuilder encodeUnlinkedCombinatorName(base.BuilderContext b uilderContext, {String name}) {
594 UnlinkedCombinatorNameBuilder builder = new UnlinkedCombinatorNameBuilder(buil derContext);
595 builder.name = name;
596 return builder;
597 }
598
599 class UnlinkedEnum extends base.SummaryClass { 557 class UnlinkedEnum extends base.SummaryClass {
600 String _name; 558 String _name;
601 List<UnlinkedEnumValue> _values; 559 List<UnlinkedEnumValue> _values;
602 560
603 UnlinkedEnum.fromJson(Map json) 561 UnlinkedEnum.fromJson(Map json)
604 : _name = json["name"], 562 : _name = json["name"],
605 _values = json["values"]?.map((x) => new UnlinkedEnumValue.fromJson(x))?.t oList(); 563 _values = json["values"]?.map((x) => new UnlinkedEnumValue.fromJson(x))?.t oList();
606 564
607 @override 565 @override
608 Map<String, Object> toMap() => { 566 Map<String, Object> toMap() => {
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); 1783 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext);
1826 builder.name = name; 1784 builder.name = name;
1827 builder.type = type; 1785 builder.type = type;
1828 builder.isStatic = isStatic; 1786 builder.isStatic = isStatic;
1829 builder.isFinal = isFinal; 1787 builder.isFinal = isFinal;
1830 builder.isConst = isConst; 1788 builder.isConst = isConst;
1831 builder.hasImplicitType = hasImplicitType; 1789 builder.hasImplicitType = hasImplicitType;
1832 return builder; 1790 return builder;
1833 } 1791 }
1834 1792
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698