| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 | 6 // To regenerate the file, use the script |
| 7 // "pkg/analysis_server/tool/spec/generate_files". | 7 // "pkg/analysis_server/tool/spec/generate_files". |
| 8 | 8 |
| 9 part of analysis_server.plugin.protocol.protocol; | 9 part of analysis_server.plugin.protocol.protocol; |
| 10 | 10 |
| (...skipping 14982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14993 @override | 14993 @override |
| 14994 int get hashCode { | 14994 int get hashCode { |
| 14995 return 27952290; | 14995 return 27952290; |
| 14996 } | 14996 } |
| 14997 } | 14997 } |
| 14998 | 14998 |
| 14999 /** | 14999 /** |
| 15000 * extractLocalVariable feedback | 15000 * extractLocalVariable feedback |
| 15001 * | 15001 * |
| 15002 * { | 15002 * { |
| 15003 * "coveringExpressionOffsets": List<int> | 15003 * "coveringExpressionOffsets": optional List<int> |
| 15004 * "coveringExpressionLengths": List<int> | 15004 * "coveringExpressionLengths": optional List<int> |
| 15005 * "names": List<String> | 15005 * "names": List<String> |
| 15006 * "offsets": List<int> | 15006 * "offsets": List<int> |
| 15007 * "lengths": List<int> | 15007 * "lengths": List<int> |
| 15008 * } | 15008 * } |
| 15009 * | 15009 * |
| 15010 * Clients may not extend, implement or mix-in this class. | 15010 * Clients may not extend, implement or mix-in this class. |
| 15011 */ | 15011 */ |
| 15012 class ExtractLocalVariableFeedback extends RefactoringFeedback implements HasToJ
son { | 15012 class ExtractLocalVariableFeedback extends RefactoringFeedback implements HasToJ
son { |
| 15013 List<int> _coveringExpressionOffsets; | 15013 List<int> _coveringExpressionOffsets; |
| 15014 | 15014 |
| 15015 List<int> _coveringExpressionLengths; | 15015 List<int> _coveringExpressionLengths; |
| 15016 | 15016 |
| 15017 List<String> _names; | 15017 List<String> _names; |
| 15018 | 15018 |
| 15019 List<int> _offsets; | 15019 List<int> _offsets; |
| 15020 | 15020 |
| 15021 List<int> _lengths; | 15021 List<int> _lengths; |
| 15022 | 15022 |
| 15023 /** | 15023 /** |
| 15024 * The offsets of the expressions that cover the specified selection, from | 15024 * The offsets of the expressions that cover the specified selection, from |
| 15025 * the down most to the up most. | 15025 * the down most to the up most. |
| 15026 */ | 15026 */ |
| 15027 List<int> get coveringExpressionOffsets => _coveringExpressionOffsets; | 15027 List<int> get coveringExpressionOffsets => _coveringExpressionOffsets; |
| 15028 | 15028 |
| 15029 /** | 15029 /** |
| 15030 * The offsets of the expressions that cover the specified selection, from | 15030 * The offsets of the expressions that cover the specified selection, from |
| 15031 * the down most to the up most. | 15031 * the down most to the up most. |
| 15032 */ | 15032 */ |
| 15033 void set coveringExpressionOffsets(List<int> value) { | 15033 void set coveringExpressionOffsets(List<int> value) { |
| 15034 assert(value != null); | |
| 15035 this._coveringExpressionOffsets = value; | 15034 this._coveringExpressionOffsets = value; |
| 15036 } | 15035 } |
| 15037 | 15036 |
| 15038 /** | 15037 /** |
| 15039 * The lengths of the expressions that cover the specified selection, from | 15038 * The lengths of the expressions that cover the specified selection, from |
| 15040 * the down most to the up most. | 15039 * the down most to the up most. |
| 15041 */ | 15040 */ |
| 15042 List<int> get coveringExpressionLengths => _coveringExpressionLengths; | 15041 List<int> get coveringExpressionLengths => _coveringExpressionLengths; |
| 15043 | 15042 |
| 15044 /** | 15043 /** |
| 15045 * The lengths of the expressions that cover the specified selection, from | 15044 * The lengths of the expressions that cover the specified selection, from |
| 15046 * the down most to the up most. | 15045 * the down most to the up most. |
| 15047 */ | 15046 */ |
| 15048 void set coveringExpressionLengths(List<int> value) { | 15047 void set coveringExpressionLengths(List<int> value) { |
| 15049 assert(value != null); | |
| 15050 this._coveringExpressionLengths = value; | 15048 this._coveringExpressionLengths = value; |
| 15051 } | 15049 } |
| 15052 | 15050 |
| 15053 /** | 15051 /** |
| 15054 * The proposed names for the local variable. | 15052 * The proposed names for the local variable. |
| 15055 */ | 15053 */ |
| 15056 List<String> get names => _names; | 15054 List<String> get names => _names; |
| 15057 | 15055 |
| 15058 /** | 15056 /** |
| 15059 * The proposed names for the local variable. | 15057 * The proposed names for the local variable. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 15090 * The lengths of the expressions that would be replaced by a reference to | 15088 * The lengths of the expressions that would be replaced by a reference to |
| 15091 * the variable. The lengths correspond to the offsets. In other words, for a | 15089 * the variable. The lengths correspond to the offsets. In other words, for a |
| 15092 * given expression, if the offset of that expression is offsets[i], then the | 15090 * given expression, if the offset of that expression is offsets[i], then the |
| 15093 * length of that expression is lengths[i]. | 15091 * length of that expression is lengths[i]. |
| 15094 */ | 15092 */ |
| 15095 void set lengths(List<int> value) { | 15093 void set lengths(List<int> value) { |
| 15096 assert(value != null); | 15094 assert(value != null); |
| 15097 this._lengths = value; | 15095 this._lengths = value; |
| 15098 } | 15096 } |
| 15099 | 15097 |
| 15100 ExtractLocalVariableFeedback(List<int> coveringExpressionOffsets, List<int> co
veringExpressionLengths, List<String> names, List<int> offsets, List<int> length
s) { | 15098 ExtractLocalVariableFeedback(List<String> names, List<int> offsets, List<int>
lengths, {List<int> coveringExpressionOffsets, List<int> coveringExpressionLengt
hs}) { |
| 15101 this.coveringExpressionOffsets = coveringExpressionOffsets; | 15099 this.coveringExpressionOffsets = coveringExpressionOffsets; |
| 15102 this.coveringExpressionLengths = coveringExpressionLengths; | 15100 this.coveringExpressionLengths = coveringExpressionLengths; |
| 15103 this.names = names; | 15101 this.names = names; |
| 15104 this.offsets = offsets; | 15102 this.offsets = offsets; |
| 15105 this.lengths = lengths; | 15103 this.lengths = lengths; |
| 15106 } | 15104 } |
| 15107 | 15105 |
| 15108 factory ExtractLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { | 15106 factory ExtractLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { |
| 15109 if (json == null) { | 15107 if (json == null) { |
| 15110 json = {}; | 15108 json = {}; |
| 15111 } | 15109 } |
| 15112 if (json is Map) { | 15110 if (json is Map) { |
| 15113 List<int> coveringExpressionOffsets; | 15111 List<int> coveringExpressionOffsets; |
| 15114 if (json.containsKey("coveringExpressionOffsets")) { | 15112 if (json.containsKey("coveringExpressionOffsets")) { |
| 15115 coveringExpressionOffsets = jsonDecoder.decodeList(jsonPath + ".covering
ExpressionOffsets", json["coveringExpressionOffsets"], jsonDecoder.decodeInt); | 15113 coveringExpressionOffsets = jsonDecoder.decodeList(jsonPath + ".covering
ExpressionOffsets", json["coveringExpressionOffsets"], jsonDecoder.decodeInt); |
| 15116 } else { | |
| 15117 throw jsonDecoder.missingKey(jsonPath, "coveringExpressionOffsets"); | |
| 15118 } | 15114 } |
| 15119 List<int> coveringExpressionLengths; | 15115 List<int> coveringExpressionLengths; |
| 15120 if (json.containsKey("coveringExpressionLengths")) { | 15116 if (json.containsKey("coveringExpressionLengths")) { |
| 15121 coveringExpressionLengths = jsonDecoder.decodeList(jsonPath + ".covering
ExpressionLengths", json["coveringExpressionLengths"], jsonDecoder.decodeInt); | 15117 coveringExpressionLengths = jsonDecoder.decodeList(jsonPath + ".covering
ExpressionLengths", json["coveringExpressionLengths"], jsonDecoder.decodeInt); |
| 15122 } else { | |
| 15123 throw jsonDecoder.missingKey(jsonPath, "coveringExpressionLengths"); | |
| 15124 } | 15118 } |
| 15125 List<String> names; | 15119 List<String> names; |
| 15126 if (json.containsKey("names")) { | 15120 if (json.containsKey("names")) { |
| 15127 names = jsonDecoder.decodeList(jsonPath + ".names", json["names"], jsonD
ecoder.decodeString); | 15121 names = jsonDecoder.decodeList(jsonPath + ".names", json["names"], jsonD
ecoder.decodeString); |
| 15128 } else { | 15122 } else { |
| 15129 throw jsonDecoder.missingKey(jsonPath, "names"); | 15123 throw jsonDecoder.missingKey(jsonPath, "names"); |
| 15130 } | 15124 } |
| 15131 List<int> offsets; | 15125 List<int> offsets; |
| 15132 if (json.containsKey("offsets")) { | 15126 if (json.containsKey("offsets")) { |
| 15133 offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"],
jsonDecoder.decodeInt); | 15127 offsets = jsonDecoder.decodeList(jsonPath + ".offsets", json["offsets"],
jsonDecoder.decodeInt); |
| 15134 } else { | 15128 } else { |
| 15135 throw jsonDecoder.missingKey(jsonPath, "offsets"); | 15129 throw jsonDecoder.missingKey(jsonPath, "offsets"); |
| 15136 } | 15130 } |
| 15137 List<int> lengths; | 15131 List<int> lengths; |
| 15138 if (json.containsKey("lengths")) { | 15132 if (json.containsKey("lengths")) { |
| 15139 lengths = jsonDecoder.decodeList(jsonPath + ".lengths", json["lengths"],
jsonDecoder.decodeInt); | 15133 lengths = jsonDecoder.decodeList(jsonPath + ".lengths", json["lengths"],
jsonDecoder.decodeInt); |
| 15140 } else { | 15134 } else { |
| 15141 throw jsonDecoder.missingKey(jsonPath, "lengths"); | 15135 throw jsonDecoder.missingKey(jsonPath, "lengths"); |
| 15142 } | 15136 } |
| 15143 return new ExtractLocalVariableFeedback(coveringExpressionOffsets, coverin
gExpressionLengths, names, offsets, lengths); | 15137 return new ExtractLocalVariableFeedback(names, offsets, lengths, coveringE
xpressionOffsets: coveringExpressionOffsets, coveringExpressionLengths: covering
ExpressionLengths); |
| 15144 } else { | 15138 } else { |
| 15145 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable feedback", json
); | 15139 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable feedback", json
); |
| 15146 } | 15140 } |
| 15147 } | 15141 } |
| 15148 | 15142 |
| 15149 Map<String, dynamic> toJson() { | 15143 Map<String, dynamic> toJson() { |
| 15150 Map<String, dynamic> result = {}; | 15144 Map<String, dynamic> result = {}; |
| 15151 result["coveringExpressionOffsets"] = coveringExpressionOffsets; | 15145 if (coveringExpressionOffsets != null) { |
| 15152 result["coveringExpressionLengths"] = coveringExpressionLengths; | 15146 result["coveringExpressionOffsets"] = coveringExpressionOffsets; |
| 15147 } |
| 15148 if (coveringExpressionLengths != null) { |
| 15149 result["coveringExpressionLengths"] = coveringExpressionLengths; |
| 15150 } |
| 15153 result["names"] = names; | 15151 result["names"] = names; |
| 15154 result["offsets"] = offsets; | 15152 result["offsets"] = offsets; |
| 15155 result["lengths"] = lengths; | 15153 result["lengths"] = lengths; |
| 15156 return result; | 15154 return result; |
| 15157 } | 15155 } |
| 15158 | 15156 |
| 15159 @override | 15157 @override |
| 15160 String toString() => JSON.encode(toJson()); | 15158 String toString() => JSON.encode(toJson()); |
| 15161 | 15159 |
| 15162 @override | 15160 @override |
| (...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16424 return false; | 16422 return false; |
| 16425 } | 16423 } |
| 16426 | 16424 |
| 16427 @override | 16425 @override |
| 16428 int get hashCode { | 16426 int get hashCode { |
| 16429 int hash = 0; | 16427 int hash = 0; |
| 16430 hash = JenkinsSmiHash.combine(hash, newName.hashCode); | 16428 hash = JenkinsSmiHash.combine(hash, newName.hashCode); |
| 16431 return JenkinsSmiHash.finish(hash); | 16429 return JenkinsSmiHash.finish(hash); |
| 16432 } | 16430 } |
| 16433 } | 16431 } |
| OLD | NEW |