OLD | NEW |
---|---|
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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
552 String _name; | 552 String _name; |
553 List<UnlinkedTypeParam> _typeParameters; | 553 List<UnlinkedTypeParam> _typeParameters; |
554 UnlinkedTypeRef _returnType; | 554 UnlinkedTypeRef _returnType; |
555 List<UnlinkedParam> _parameters; | 555 List<UnlinkedParam> _parameters; |
556 UnlinkedExecutableKind _kind; | 556 UnlinkedExecutableKind _kind; |
557 bool _isAbstract; | 557 bool _isAbstract; |
558 bool _isStatic; | 558 bool _isStatic; |
559 bool _isConst; | 559 bool _isConst; |
560 bool _isFactory; | 560 bool _isFactory; |
561 bool _hasImplicitReturnType; | 561 bool _hasImplicitReturnType; |
562 bool _isExternal; | |
562 | 563 |
563 UnlinkedExecutable.fromJson(Map json) | 564 UnlinkedExecutable.fromJson(Map json) |
564 : _name = json["name"], | 565 : _name = json["name"], |
565 _typeParameters = json["typeParameters"]?.map((x) => new UnlinkedTypeParam .fromJson(x))?.toList(), | 566 _typeParameters = json["typeParameters"]?.map((x) => new UnlinkedTypeParam .fromJson(x))?.toList(), |
566 _returnType = json["returnType"] == null ? null : new UnlinkedTypeRef.from Json(json["returnType"]), | 567 _returnType = json["returnType"] == null ? null : new UnlinkedTypeRef.from Json(json["returnType"]), |
567 _parameters = json["parameters"]?.map((x) => new UnlinkedParam.fromJson(x) )?.toList(), | 568 _parameters = json["parameters"]?.map((x) => new UnlinkedParam.fromJson(x) )?.toList(), |
568 _kind = json["kind"] == null ? null : UnlinkedExecutableKind.values[json[" kind"]], | 569 _kind = json["kind"] == null ? null : UnlinkedExecutableKind.values[json[" kind"]], |
569 _isAbstract = json["isAbstract"], | 570 _isAbstract = json["isAbstract"], |
570 _isStatic = json["isStatic"], | 571 _isStatic = json["isStatic"], |
571 _isConst = json["isConst"], | 572 _isConst = json["isConst"], |
572 _isFactory = json["isFactory"], | 573 _isFactory = json["isFactory"], |
573 _hasImplicitReturnType = json["hasImplicitReturnType"]; | 574 _hasImplicitReturnType = json["hasImplicitReturnType"], |
575 _isExternal = json["isExternal"]; | |
Brian Wilkerson
2015/12/16 21:26:02
Perhaps use constants rather than literal strings
Paul Berry
2015/12/16 21:27:44
This is generated code so I'm not too worried abou
| |
574 | 576 |
575 String get name => _name ?? ''; | 577 String get name => _name ?? ''; |
576 List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <Unlink edTypeParam>[]; | 578 List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <Unlink edTypeParam>[]; |
577 UnlinkedTypeRef get returnType => _returnType; | 579 UnlinkedTypeRef get returnType => _returnType; |
578 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[]; | 580 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[]; |
579 UnlinkedExecutableKind get kind => _kind ?? UnlinkedExecutableKind.functionOrM ethod; | 581 UnlinkedExecutableKind get kind => _kind ?? UnlinkedExecutableKind.functionOrM ethod; |
580 bool get isAbstract => _isAbstract ?? false; | 582 bool get isAbstract => _isAbstract ?? false; |
581 bool get isStatic => _isStatic ?? false; | 583 bool get isStatic => _isStatic ?? false; |
582 bool get isConst => _isConst ?? false; | 584 bool get isConst => _isConst ?? false; |
583 bool get isFactory => _isFactory ?? false; | 585 bool get isFactory => _isFactory ?? false; |
584 bool get hasImplicitReturnType => _hasImplicitReturnType ?? false; | 586 bool get hasImplicitReturnType => _hasImplicitReturnType ?? false; |
587 bool get isExternal => _isExternal ?? false; | |
585 } | 588 } |
586 | 589 |
587 class UnlinkedExecutableBuilder { | 590 class UnlinkedExecutableBuilder { |
588 final Map _json = {}; | 591 final Map _json = {}; |
589 | 592 |
590 bool _finished = false; | 593 bool _finished = false; |
591 | 594 |
592 UnlinkedExecutableBuilder(builder.BuilderContext context); | 595 UnlinkedExecutableBuilder(builder.BuilderContext context); |
593 | 596 |
594 void set name(String _value) { | 597 void set name(String _value) { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
664 } | 667 } |
665 | 668 |
666 void set hasImplicitReturnType(bool _value) { | 669 void set hasImplicitReturnType(bool _value) { |
667 assert(!_finished); | 670 assert(!_finished); |
668 assert(!_json.containsKey("hasImplicitReturnType")); | 671 assert(!_json.containsKey("hasImplicitReturnType")); |
669 if (_value != null) { | 672 if (_value != null) { |
670 _json["hasImplicitReturnType"] = _value; | 673 _json["hasImplicitReturnType"] = _value; |
671 } | 674 } |
672 } | 675 } |
673 | 676 |
677 void set isExternal(bool _value) { | |
678 assert(!_finished); | |
679 assert(!_json.containsKey("isExternal")); | |
680 if (_value != null) { | |
681 _json["isExternal"] = _value; | |
682 } | |
683 } | |
684 | |
674 Map finish() { | 685 Map finish() { |
675 assert(!_finished); | 686 assert(!_finished); |
676 _finished = true; | 687 _finished = true; |
677 return _json; | 688 return _json; |
678 } | 689 } |
679 } | 690 } |
680 | 691 |
681 UnlinkedExecutableBuilder encodeUnlinkedExecutable(builder.BuilderContext builde rContext, {String name, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedT ypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters, UnlinkedExecuta bleKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFactory, bool hasImplicitReturnType}) { | 692 UnlinkedExecutableBuilder encodeUnlinkedExecutable(builder.BuilderContext builde rContext, {String name, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedT ypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters, UnlinkedExecuta bleKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFactory, bool hasImplicitReturnType, bool isExternal}) { |
682 UnlinkedExecutableBuilder builder = new UnlinkedExecutableBuilder(builderConte xt); | 693 UnlinkedExecutableBuilder builder = new UnlinkedExecutableBuilder(builderConte xt); |
683 builder.name = name; | 694 builder.name = name; |
684 builder.typeParameters = typeParameters; | 695 builder.typeParameters = typeParameters; |
685 builder.returnType = returnType; | 696 builder.returnType = returnType; |
686 builder.parameters = parameters; | 697 builder.parameters = parameters; |
687 builder.kind = kind; | 698 builder.kind = kind; |
688 builder.isAbstract = isAbstract; | 699 builder.isAbstract = isAbstract; |
689 builder.isStatic = isStatic; | 700 builder.isStatic = isStatic; |
690 builder.isConst = isConst; | 701 builder.isConst = isConst; |
691 builder.isFactory = isFactory; | 702 builder.isFactory = isFactory; |
692 builder.hasImplicitReturnType = hasImplicitReturnType; | 703 builder.hasImplicitReturnType = hasImplicitReturnType; |
704 builder.isExternal = isExternal; | |
693 return builder; | 705 return builder; |
694 } | 706 } |
695 | 707 |
696 class UnlinkedExport { | 708 class UnlinkedExport { |
697 String _uri; | 709 String _uri; |
698 List<UnlinkedCombinator> _combinators; | 710 List<UnlinkedCombinator> _combinators; |
699 | 711 |
700 UnlinkedExport.fromJson(Map json) | 712 UnlinkedExport.fromJson(Map json) |
701 : _uri = json["uri"], | 713 : _uri = json["uri"], |
702 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from Json(x))?.toList(); | 714 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from Json(x))?.toList(); |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1452 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); | 1464 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); |
1453 builder.name = name; | 1465 builder.name = name; |
1454 builder.type = type; | 1466 builder.type = type; |
1455 builder.isStatic = isStatic; | 1467 builder.isStatic = isStatic; |
1456 builder.isFinal = isFinal; | 1468 builder.isFinal = isFinal; |
1457 builder.isConst = isConst; | 1469 builder.isConst = isConst; |
1458 builder.hasImplicitType = hasImplicitType; | 1470 builder.hasImplicitType = hasImplicitType; |
1459 return builder; | 1471 return builder; |
1460 } | 1472 } |
1461 | 1473 |
OLD | NEW |