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 9429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9440 } | 9440 } |
9441 | 9441 |
9442 /** | 9442 /** |
9443 * ContextData | 9443 * ContextData |
9444 * | 9444 * |
9445 * { | 9445 * { |
9446 * "name": String | 9446 * "name": String |
9447 * "explicitFileCount": int | 9447 * "explicitFileCount": int |
9448 * "implicitFileCount": int | 9448 * "implicitFileCount": int |
9449 * "workItemQueueLength": int | 9449 * "workItemQueueLength": int |
9450 * "workItemQueueLengthAverage": String | |
9451 * "cacheEntryExceptions": List<String> | 9450 * "cacheEntryExceptions": List<String> |
9452 * } | 9451 * } |
9453 * | 9452 * |
9454 * Clients may not extend, implement or mix-in this class. | 9453 * Clients may not extend, implement or mix-in this class. |
9455 */ | 9454 */ |
9456 class ContextData implements HasToJson { | 9455 class ContextData implements HasToJson { |
9457 String _name; | 9456 String _name; |
9458 | 9457 |
9459 int _explicitFileCount; | 9458 int _explicitFileCount; |
9460 | 9459 |
9461 int _implicitFileCount; | 9460 int _implicitFileCount; |
9462 | 9461 |
9463 int _workItemQueueLength; | 9462 int _workItemQueueLength; |
9464 | 9463 |
9465 String _workItemQueueLengthAverage; | |
9466 | |
9467 List<String> _cacheEntryExceptions; | 9464 List<String> _cacheEntryExceptions; |
9468 | 9465 |
9469 /** | 9466 /** |
9470 * The name of the context. | 9467 * The name of the context. |
9471 */ | 9468 */ |
9472 String get name => _name; | 9469 String get name => _name; |
9473 | 9470 |
9474 /** | 9471 /** |
9475 * The name of the context. | 9472 * The name of the context. |
9476 */ | 9473 */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9512 | 9509 |
9513 /** | 9510 /** |
9514 * The number of work items in the queue. | 9511 * The number of work items in the queue. |
9515 */ | 9512 */ |
9516 void set workItemQueueLength(int value) { | 9513 void set workItemQueueLength(int value) { |
9517 assert(value != null); | 9514 assert(value != null); |
9518 this._workItemQueueLength = value; | 9515 this._workItemQueueLength = value; |
9519 } | 9516 } |
9520 | 9517 |
9521 /** | 9518 /** |
9522 * A rolling average of work items in the queue. (A double encoded as a | |
9523 * String.) | |
9524 */ | |
9525 String get workItemQueueLengthAverage => _workItemQueueLengthAverage; | |
9526 | |
9527 /** | |
9528 * A rolling average of work items in the queue. (A double encoded as a | |
9529 * String.) | |
9530 */ | |
9531 void set workItemQueueLengthAverage(String value) { | |
9532 assert(value != null); | |
9533 this._workItemQueueLengthAverage = value; | |
9534 } | |
9535 | |
9536 /** | |
9537 * Exceptions associated with cache entries. | 9519 * Exceptions associated with cache entries. |
9538 */ | 9520 */ |
9539 List<String> get cacheEntryExceptions => _cacheEntryExceptions; | 9521 List<String> get cacheEntryExceptions => _cacheEntryExceptions; |
9540 | 9522 |
9541 /** | 9523 /** |
9542 * Exceptions associated with cache entries. | 9524 * Exceptions associated with cache entries. |
9543 */ | 9525 */ |
9544 void set cacheEntryExceptions(List<String> value) { | 9526 void set cacheEntryExceptions(List<String> value) { |
9545 assert(value != null); | 9527 assert(value != null); |
9546 this._cacheEntryExceptions = value; | 9528 this._cacheEntryExceptions = value; |
9547 } | 9529 } |
9548 | 9530 |
9549 ContextData(String name, int explicitFileCount, int implicitFileCount, int wor
kItemQueueLength, String workItemQueueLengthAverage, List<String> cacheEntryExce
ptions) { | 9531 ContextData(String name, int explicitFileCount, int implicitFileCount, int wor
kItemQueueLength, List<String> cacheEntryExceptions) { |
9550 this.name = name; | 9532 this.name = name; |
9551 this.explicitFileCount = explicitFileCount; | 9533 this.explicitFileCount = explicitFileCount; |
9552 this.implicitFileCount = implicitFileCount; | 9534 this.implicitFileCount = implicitFileCount; |
9553 this.workItemQueueLength = workItemQueueLength; | 9535 this.workItemQueueLength = workItemQueueLength; |
9554 this.workItemQueueLengthAverage = workItemQueueLengthAverage; | |
9555 this.cacheEntryExceptions = cacheEntryExceptions; | 9536 this.cacheEntryExceptions = cacheEntryExceptions; |
9556 } | 9537 } |
9557 | 9538 |
9558 factory ContextData.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { | 9539 factory ContextData.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { |
9559 if (json == null) { | 9540 if (json == null) { |
9560 json = {}; | 9541 json = {}; |
9561 } | 9542 } |
9562 if (json is Map) { | 9543 if (json is Map) { |
9563 String name; | 9544 String name; |
9564 if (json.containsKey("name")) { | 9545 if (json.containsKey("name")) { |
(...skipping 12 matching lines...) Expand all Loading... |
9577 implicitFileCount = jsonDecoder.decodeInt(jsonPath + ".implicitFileCount
", json["implicitFileCount"]); | 9558 implicitFileCount = jsonDecoder.decodeInt(jsonPath + ".implicitFileCount
", json["implicitFileCount"]); |
9578 } else { | 9559 } else { |
9579 throw jsonDecoder.missingKey(jsonPath, "implicitFileCount"); | 9560 throw jsonDecoder.missingKey(jsonPath, "implicitFileCount"); |
9580 } | 9561 } |
9581 int workItemQueueLength; | 9562 int workItemQueueLength; |
9582 if (json.containsKey("workItemQueueLength")) { | 9563 if (json.containsKey("workItemQueueLength")) { |
9583 workItemQueueLength = jsonDecoder.decodeInt(jsonPath + ".workItemQueueLe
ngth", json["workItemQueueLength"]); | 9564 workItemQueueLength = jsonDecoder.decodeInt(jsonPath + ".workItemQueueLe
ngth", json["workItemQueueLength"]); |
9584 } else { | 9565 } else { |
9585 throw jsonDecoder.missingKey(jsonPath, "workItemQueueLength"); | 9566 throw jsonDecoder.missingKey(jsonPath, "workItemQueueLength"); |
9586 } | 9567 } |
9587 String workItemQueueLengthAverage; | |
9588 if (json.containsKey("workItemQueueLengthAverage")) { | |
9589 workItemQueueLengthAverage = jsonDecoder.decodeString(jsonPath + ".workI
temQueueLengthAverage", json["workItemQueueLengthAverage"]); | |
9590 } else { | |
9591 throw jsonDecoder.missingKey(jsonPath, "workItemQueueLengthAverage"); | |
9592 } | |
9593 List<String> cacheEntryExceptions; | 9568 List<String> cacheEntryExceptions; |
9594 if (json.containsKey("cacheEntryExceptions")) { | 9569 if (json.containsKey("cacheEntryExceptions")) { |
9595 cacheEntryExceptions = jsonDecoder.decodeList(jsonPath + ".cacheEntryExc
eptions", json["cacheEntryExceptions"], jsonDecoder.decodeString); | 9570 cacheEntryExceptions = jsonDecoder.decodeList(jsonPath + ".cacheEntryExc
eptions", json["cacheEntryExceptions"], jsonDecoder.decodeString); |
9596 } else { | 9571 } else { |
9597 throw jsonDecoder.missingKey(jsonPath, "cacheEntryExceptions"); | 9572 throw jsonDecoder.missingKey(jsonPath, "cacheEntryExceptions"); |
9598 } | 9573 } |
9599 return new ContextData(name, explicitFileCount, implicitFileCount, workIte
mQueueLength, workItemQueueLengthAverage, cacheEntryExceptions); | 9574 return new ContextData(name, explicitFileCount, implicitFileCount, workIte
mQueueLength, cacheEntryExceptions); |
9600 } else { | 9575 } else { |
9601 throw jsonDecoder.mismatch(jsonPath, "ContextData", json); | 9576 throw jsonDecoder.mismatch(jsonPath, "ContextData", json); |
9602 } | 9577 } |
9603 } | 9578 } |
9604 | 9579 |
9605 Map<String, dynamic> toJson() { | 9580 Map<String, dynamic> toJson() { |
9606 Map<String, dynamic> result = {}; | 9581 Map<String, dynamic> result = {}; |
9607 result["name"] = name; | 9582 result["name"] = name; |
9608 result["explicitFileCount"] = explicitFileCount; | 9583 result["explicitFileCount"] = explicitFileCount; |
9609 result["implicitFileCount"] = implicitFileCount; | 9584 result["implicitFileCount"] = implicitFileCount; |
9610 result["workItemQueueLength"] = workItemQueueLength; | 9585 result["workItemQueueLength"] = workItemQueueLength; |
9611 result["workItemQueueLengthAverage"] = workItemQueueLengthAverage; | |
9612 result["cacheEntryExceptions"] = cacheEntryExceptions; | 9586 result["cacheEntryExceptions"] = cacheEntryExceptions; |
9613 return result; | 9587 return result; |
9614 } | 9588 } |
9615 | 9589 |
9616 @override | 9590 @override |
9617 String toString() => JSON.encode(toJson()); | 9591 String toString() => JSON.encode(toJson()); |
9618 | 9592 |
9619 @override | 9593 @override |
9620 bool operator==(other) { | 9594 bool operator==(other) { |
9621 if (other is ContextData) { | 9595 if (other is ContextData) { |
9622 return name == other.name && | 9596 return name == other.name && |
9623 explicitFileCount == other.explicitFileCount && | 9597 explicitFileCount == other.explicitFileCount && |
9624 implicitFileCount == other.implicitFileCount && | 9598 implicitFileCount == other.implicitFileCount && |
9625 workItemQueueLength == other.workItemQueueLength && | 9599 workItemQueueLength == other.workItemQueueLength && |
9626 workItemQueueLengthAverage == other.workItemQueueLengthAverage && | |
9627 listEqual(cacheEntryExceptions, other.cacheEntryExceptions, (String a,
String b) => a == b); | 9600 listEqual(cacheEntryExceptions, other.cacheEntryExceptions, (String a,
String b) => a == b); |
9628 } | 9601 } |
9629 return false; | 9602 return false; |
9630 } | 9603 } |
9631 | 9604 |
9632 @override | 9605 @override |
9633 int get hashCode { | 9606 int get hashCode { |
9634 int hash = 0; | 9607 int hash = 0; |
9635 hash = JenkinsSmiHash.combine(hash, name.hashCode); | 9608 hash = JenkinsSmiHash.combine(hash, name.hashCode); |
9636 hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode); | 9609 hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode); |
9637 hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode); | 9610 hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode); |
9638 hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode); | 9611 hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode); |
9639 hash = JenkinsSmiHash.combine(hash, workItemQueueLengthAverage.hashCode); | |
9640 hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode); | 9612 hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode); |
9641 return JenkinsSmiHash.finish(hash); | 9613 return JenkinsSmiHash.finish(hash); |
9642 } | 9614 } |
9643 } | 9615 } |
9644 | 9616 |
9645 /** | 9617 /** |
9646 * Element | 9618 * Element |
9647 * | 9619 * |
9648 * { | 9620 * { |
9649 * "kind": ElementKind | 9621 * "kind": ElementKind |
(...skipping 7257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16907 return false; | 16879 return false; |
16908 } | 16880 } |
16909 | 16881 |
16910 @override | 16882 @override |
16911 int get hashCode { | 16883 int get hashCode { |
16912 int hash = 0; | 16884 int hash = 0; |
16913 hash = JenkinsSmiHash.combine(hash, newName.hashCode); | 16885 hash = JenkinsSmiHash.combine(hash, newName.hashCode); |
16914 return JenkinsSmiHash.finish(hash); | 16886 return JenkinsSmiHash.finish(hash); |
16915 } | 16887 } |
16916 } | 16888 } |
OLD | NEW |