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 protocol; | 9 part of protocol; |
10 /** | 10 /** |
(...skipping 4321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4332 return _JenkinsSmiHash.finish(hash); | 4332 return _JenkinsSmiHash.finish(hash); |
4333 } | 4333 } |
4334 } | 4334 } |
4335 | 4335 |
4336 /** | 4336 /** |
4337 * search.getTypeHierarchy params | 4337 * search.getTypeHierarchy params |
4338 * | 4338 * |
4339 * { | 4339 * { |
4340 * "file": FilePath | 4340 * "file": FilePath |
4341 * "offset": int | 4341 * "offset": int |
| 4342 * "superOnly": optional bool |
4342 * } | 4343 * } |
4343 */ | 4344 */ |
4344 class SearchGetTypeHierarchyParams implements HasToJson { | 4345 class SearchGetTypeHierarchyParams implements HasToJson { |
4345 String _file; | 4346 String _file; |
4346 | 4347 |
4347 int _offset; | 4348 int _offset; |
4348 | 4349 |
| 4350 bool _superOnly; |
| 4351 |
4349 /** | 4352 /** |
4350 * The file containing the declaration or reference to the type for which a | 4353 * The file containing the declaration or reference to the type for which a |
4351 * hierarchy is being requested. | 4354 * hierarchy is being requested. |
4352 */ | 4355 */ |
4353 String get file => _file; | 4356 String get file => _file; |
4354 | 4357 |
4355 /** | 4358 /** |
4356 * The file containing the declaration or reference to the type for which a | 4359 * The file containing the declaration or reference to the type for which a |
4357 * hierarchy is being requested. | 4360 * hierarchy is being requested. |
4358 */ | 4361 */ |
4359 void set file(String value) { | 4362 void set file(String value) { |
4360 assert(value != null); | 4363 assert(value != null); |
4361 this._file = value; | 4364 this._file = value; |
4362 } | 4365 } |
4363 | 4366 |
4364 /** | 4367 /** |
4365 * The offset of the name of the type within the file. | 4368 * The offset of the name of the type within the file. |
4366 */ | 4369 */ |
4367 int get offset => _offset; | 4370 int get offset => _offset; |
4368 | 4371 |
4369 /** | 4372 /** |
4370 * The offset of the name of the type within the file. | 4373 * The offset of the name of the type within the file. |
4371 */ | 4374 */ |
4372 void set offset(int value) { | 4375 void set offset(int value) { |
4373 assert(value != null); | 4376 assert(value != null); |
4374 this._offset = value; | 4377 this._offset = value; |
4375 } | 4378 } |
4376 | 4379 |
4377 SearchGetTypeHierarchyParams(String file, int offset) { | 4380 /** |
| 4381 * True if the client is only requesting superclasses and interfaces |
| 4382 * hierarchy. |
| 4383 */ |
| 4384 bool get superOnly => _superOnly; |
| 4385 |
| 4386 /** |
| 4387 * True if the client is only requesting superclasses and interfaces |
| 4388 * hierarchy. |
| 4389 */ |
| 4390 void set superOnly(bool value) { |
| 4391 this._superOnly = value; |
| 4392 } |
| 4393 |
| 4394 SearchGetTypeHierarchyParams(String file, int offset, {bool superOnly}) { |
4378 this.file = file; | 4395 this.file = file; |
4379 this.offset = offset; | 4396 this.offset = offset; |
| 4397 this.superOnly = superOnly; |
4380 } | 4398 } |
4381 | 4399 |
4382 factory SearchGetTypeHierarchyParams.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { | 4400 factory SearchGetTypeHierarchyParams.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { |
4383 if (json == null) { | 4401 if (json == null) { |
4384 json = {}; | 4402 json = {}; |
4385 } | 4403 } |
4386 if (json is Map) { | 4404 if (json is Map) { |
4387 String file; | 4405 String file; |
4388 if (json.containsKey("file")) { | 4406 if (json.containsKey("file")) { |
4389 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); | 4407 file = jsonDecoder._decodeString(jsonPath + ".file", json["file"]); |
4390 } else { | 4408 } else { |
4391 throw jsonDecoder.missingKey(jsonPath, "file"); | 4409 throw jsonDecoder.missingKey(jsonPath, "file"); |
4392 } | 4410 } |
4393 int offset; | 4411 int offset; |
4394 if (json.containsKey("offset")) { | 4412 if (json.containsKey("offset")) { |
4395 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); | 4413 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); |
4396 } else { | 4414 } else { |
4397 throw jsonDecoder.missingKey(jsonPath, "offset"); | 4415 throw jsonDecoder.missingKey(jsonPath, "offset"); |
4398 } | 4416 } |
4399 return new SearchGetTypeHierarchyParams(file, offset); | 4417 bool superOnly; |
| 4418 if (json.containsKey("superOnly")) { |
| 4419 superOnly = jsonDecoder._decodeBool(jsonPath + ".superOnly", json["super
Only"]); |
| 4420 } |
| 4421 return new SearchGetTypeHierarchyParams(file, offset, superOnly: superOnly
); |
4400 } else { | 4422 } else { |
4401 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy params", jso
n); | 4423 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy params", jso
n); |
4402 } | 4424 } |
4403 } | 4425 } |
4404 | 4426 |
4405 factory SearchGetTypeHierarchyParams.fromRequest(Request request) { | 4427 factory SearchGetTypeHierarchyParams.fromRequest(Request request) { |
4406 return new SearchGetTypeHierarchyParams.fromJson( | 4428 return new SearchGetTypeHierarchyParams.fromJson( |
4407 new RequestDecoder(request), "params", request._params); | 4429 new RequestDecoder(request), "params", request._params); |
4408 } | 4430 } |
4409 | 4431 |
4410 Map<String, dynamic> toJson() { | 4432 Map<String, dynamic> toJson() { |
4411 Map<String, dynamic> result = {}; | 4433 Map<String, dynamic> result = {}; |
4412 result["file"] = file; | 4434 result["file"] = file; |
4413 result["offset"] = offset; | 4435 result["offset"] = offset; |
| 4436 if (superOnly != null) { |
| 4437 result["superOnly"] = superOnly; |
| 4438 } |
4414 return result; | 4439 return result; |
4415 } | 4440 } |
4416 | 4441 |
4417 Request toRequest(String id) { | 4442 Request toRequest(String id) { |
4418 return new Request(id, "search.getTypeHierarchy", toJson()); | 4443 return new Request(id, "search.getTypeHierarchy", toJson()); |
4419 } | 4444 } |
4420 | 4445 |
4421 @override | 4446 @override |
4422 String toString() => JSON.encode(toJson()); | 4447 String toString() => JSON.encode(toJson()); |
4423 | 4448 |
4424 @override | 4449 @override |
4425 bool operator==(other) { | 4450 bool operator==(other) { |
4426 if (other is SearchGetTypeHierarchyParams) { | 4451 if (other is SearchGetTypeHierarchyParams) { |
4427 return file == other.file && | 4452 return file == other.file && |
4428 offset == other.offset; | 4453 offset == other.offset && |
| 4454 superOnly == other.superOnly; |
4429 } | 4455 } |
4430 return false; | 4456 return false; |
4431 } | 4457 } |
4432 | 4458 |
4433 @override | 4459 @override |
4434 int get hashCode { | 4460 int get hashCode { |
4435 int hash = 0; | 4461 int hash = 0; |
4436 hash = _JenkinsSmiHash.combine(hash, file.hashCode); | 4462 hash = _JenkinsSmiHash.combine(hash, file.hashCode); |
4437 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); | 4463 hash = _JenkinsSmiHash.combine(hash, offset.hashCode); |
| 4464 hash = _JenkinsSmiHash.combine(hash, superOnly.hashCode); |
4438 return _JenkinsSmiHash.finish(hash); | 4465 return _JenkinsSmiHash.finish(hash); |
4439 } | 4466 } |
4440 } | 4467 } |
4441 | 4468 |
4442 /** | 4469 /** |
4443 * search.getTypeHierarchy result | 4470 * search.getTypeHierarchy result |
4444 * | 4471 * |
4445 * { | 4472 * { |
4446 * "hierarchyItems": optional List<TypeHierarchyItem> | 4473 * "hierarchyItems": optional List<TypeHierarchyItem> |
4447 * } | 4474 * } |
(...skipping 11117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15565 return false; | 15592 return false; |
15566 } | 15593 } |
15567 | 15594 |
15568 @override | 15595 @override |
15569 int get hashCode { | 15596 int get hashCode { |
15570 int hash = 0; | 15597 int hash = 0; |
15571 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 15598 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
15572 return _JenkinsSmiHash.finish(hash); | 15599 return _JenkinsSmiHash.finish(hash); |
15573 } | 15600 } |
15574 } | 15601 } |
OLD | NEW |