| 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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 builder.shows = shows; | 854 builder.shows = shows; |
| 855 builder.hides = hides; | 855 builder.hides = hides; |
| 856 return builder; | 856 return builder; |
| 857 } | 857 } |
| 858 | 858 |
| 859 /** | 859 /** |
| 860 * Unlinked summary information about a documentation comment. | 860 * Unlinked summary information about a documentation comment. |
| 861 */ | 861 */ |
| 862 class UnlinkedDocumentationComment extends base.SummaryClass { | 862 class UnlinkedDocumentationComment extends base.SummaryClass { |
| 863 String _text; | 863 String _text; |
| 864 int _offset; |
| 865 int _length; |
| 864 | 866 |
| 865 UnlinkedDocumentationComment.fromJson(Map json) | 867 UnlinkedDocumentationComment.fromJson(Map json) |
| 866 : _text = json["text"]; | 868 : _text = json["text"], |
| 869 _offset = json["offset"], |
| 870 _length = json["length"]; |
| 867 | 871 |
| 868 @override | 872 @override |
| 869 Map<String, Object> toMap() => { | 873 Map<String, Object> toMap() => { |
| 870 "text": text, | 874 "text": text, |
| 875 "offset": offset, |
| 876 "length": length, |
| 871 }; | 877 }; |
| 872 | 878 |
| 873 /** | 879 /** |
| 874 * Text of the documentation comment, with '\r\n' replaced by '\n'. | 880 * Text of the documentation comment, with '\r\n' replaced by '\n'. |
| 875 * | 881 * |
| 876 * References appearing within the doc comment in square brackets are not | 882 * References appearing within the doc comment in square brackets are not |
| 877 * specially encoded. | 883 * specially encoded. |
| 878 */ | 884 */ |
| 879 String get text => _text ?? ''; | 885 String get text => _text ?? ''; |
| 886 |
| 887 /** |
| 888 * Offset of the beginning of the documentation comment relative to the |
| 889 * beginning of the file. |
| 890 */ |
| 891 int get offset => _offset ?? 0; |
| 892 |
| 893 /** |
| 894 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). |
| 895 */ |
| 896 int get length => _length ?? 0; |
| 880 } | 897 } |
| 881 | 898 |
| 882 class UnlinkedDocumentationCommentBuilder { | 899 class UnlinkedDocumentationCommentBuilder { |
| 883 final Map _json = {}; | 900 final Map _json = {}; |
| 884 | 901 |
| 885 bool _finished = false; | 902 bool _finished = false; |
| 886 | 903 |
| 887 UnlinkedDocumentationCommentBuilder(base.BuilderContext context); | 904 UnlinkedDocumentationCommentBuilder(base.BuilderContext context); |
| 888 | 905 |
| 889 /** | 906 /** |
| 890 * Text of the documentation comment, with '\r\n' replaced by '\n'. | 907 * Text of the documentation comment, with '\r\n' replaced by '\n'. |
| 891 * | 908 * |
| 892 * References appearing within the doc comment in square brackets are not | 909 * References appearing within the doc comment in square brackets are not |
| 893 * specially encoded. | 910 * specially encoded. |
| 894 */ | 911 */ |
| 895 void set text(String _value) { | 912 void set text(String _value) { |
| 896 assert(!_finished); | 913 assert(!_finished); |
| 897 assert(!_json.containsKey("text")); | 914 assert(!_json.containsKey("text")); |
| 898 if (_value != null) { | 915 if (_value != null) { |
| 899 _json["text"] = _value; | 916 _json["text"] = _value; |
| 900 } | 917 } |
| 901 } | 918 } |
| 902 | 919 |
| 920 /** |
| 921 * Offset of the beginning of the documentation comment relative to the |
| 922 * beginning of the file. |
| 923 */ |
| 924 void set offset(int _value) { |
| 925 assert(!_finished); |
| 926 assert(!_json.containsKey("offset")); |
| 927 if (_value != null) { |
| 928 _json["offset"] = _value; |
| 929 } |
| 930 } |
| 931 |
| 932 /** |
| 933 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). |
| 934 */ |
| 935 void set length(int _value) { |
| 936 assert(!_finished); |
| 937 assert(!_json.containsKey("length")); |
| 938 if (_value != null) { |
| 939 _json["length"] = _value; |
| 940 } |
| 941 } |
| 942 |
| 903 Map finish() { | 943 Map finish() { |
| 904 assert(!_finished); | 944 assert(!_finished); |
| 905 _finished = true; | 945 _finished = true; |
| 906 return _json; | 946 return _json; |
| 907 } | 947 } |
| 908 } | 948 } |
| 909 | 949 |
| 910 UnlinkedDocumentationCommentBuilder encodeUnlinkedDocumentationComment(base.Buil
derContext builderContext, {String text}) { | 950 UnlinkedDocumentationCommentBuilder encodeUnlinkedDocumentationComment(base.Buil
derContext builderContext, {String text, int offset, int length}) { |
| 911 UnlinkedDocumentationCommentBuilder builder = new UnlinkedDocumentationComment
Builder(builderContext); | 951 UnlinkedDocumentationCommentBuilder builder = new UnlinkedDocumentationComment
Builder(builderContext); |
| 912 builder.text = text; | 952 builder.text = text; |
| 953 builder.offset = offset; |
| 954 builder.length = length; |
| 913 return builder; | 955 return builder; |
| 914 } | 956 } |
| 915 | 957 |
| 916 /** | 958 /** |
| 917 * Unlinked summary information about an enum declaration. | 959 * Unlinked summary information about an enum declaration. |
| 918 */ | 960 */ |
| 919 class UnlinkedEnum extends base.SummaryClass { | 961 class UnlinkedEnum extends base.SummaryClass { |
| 920 String _name; | 962 String _name; |
| 921 int _nameOffset; | 963 int _nameOffset; |
| 922 UnlinkedDocumentationComment _documentationComment; | 964 UnlinkedDocumentationComment _documentationComment; |
| (...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3309 builder.nameOffset = nameOffset; | 3351 builder.nameOffset = nameOffset; |
| 3310 builder.documentationComment = documentationComment; | 3352 builder.documentationComment = documentationComment; |
| 3311 builder.type = type; | 3353 builder.type = type; |
| 3312 builder.isStatic = isStatic; | 3354 builder.isStatic = isStatic; |
| 3313 builder.isFinal = isFinal; | 3355 builder.isFinal = isFinal; |
| 3314 builder.isConst = isConst; | 3356 builder.isConst = isConst; |
| 3315 builder.hasImplicitType = hasImplicitType; | 3357 builder.hasImplicitType = hasImplicitType; |
| 3316 return builder; | 3358 return builder; |
| 3317 } | 3359 } |
| 3318 | 3360 |
| OLD | NEW |