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 14663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14674 @override | 14674 @override |
14675 int get hashCode { | 14675 int get hashCode { |
14676 return 27952290; | 14676 return 27952290; |
14677 } | 14677 } |
14678 } | 14678 } |
14679 | 14679 |
14680 /** | 14680 /** |
14681 * extractLocalVariable feedback | 14681 * extractLocalVariable feedback |
14682 * | 14682 * |
14683 * { | 14683 * { |
| 14684 * "coveringExpressionOffsets": List<int> |
| 14685 * "coveringExpressionLengths": List<int> |
14684 * "names": List<String> | 14686 * "names": List<String> |
14685 * "offsets": List<int> | 14687 * "offsets": List<int> |
14686 * "lengths": List<int> | 14688 * "lengths": List<int> |
14687 * } | 14689 * } |
14688 */ | 14690 */ |
14689 class ExtractLocalVariableFeedback extends RefactoringFeedback implements HasToJ
son { | 14691 class ExtractLocalVariableFeedback extends RefactoringFeedback implements HasToJ
son { |
| 14692 List<int> _coveringExpressionOffsets; |
| 14693 |
| 14694 List<int> _coveringExpressionLengths; |
| 14695 |
14690 List<String> _names; | 14696 List<String> _names; |
14691 | 14697 |
14692 List<int> _offsets; | 14698 List<int> _offsets; |
14693 | 14699 |
14694 List<int> _lengths; | 14700 List<int> _lengths; |
14695 | 14701 |
14696 /** | 14702 /** |
| 14703 * The offsets of the expressions that cover the specified selection, from |
| 14704 * the down most to the up most. |
| 14705 */ |
| 14706 List<int> get coveringExpressionOffsets => _coveringExpressionOffsets; |
| 14707 |
| 14708 /** |
| 14709 * The offsets of the expressions that cover the specified selection, from |
| 14710 * the down most to the up most. |
| 14711 */ |
| 14712 void set coveringExpressionOffsets(List<int> value) { |
| 14713 assert(value != null); |
| 14714 this._coveringExpressionOffsets = value; |
| 14715 } |
| 14716 |
| 14717 /** |
| 14718 * The lengths of the expressions that cover the specified selection, from |
| 14719 * the down most to the up most. |
| 14720 */ |
| 14721 List<int> get coveringExpressionLengths => _coveringExpressionLengths; |
| 14722 |
| 14723 /** |
| 14724 * The lengths of the expressions that cover the specified selection, from |
| 14725 * the down most to the up most. |
| 14726 */ |
| 14727 void set coveringExpressionLengths(List<int> value) { |
| 14728 assert(value != null); |
| 14729 this._coveringExpressionLengths = value; |
| 14730 } |
| 14731 |
| 14732 /** |
14697 * The proposed names for the local variable. | 14733 * The proposed names for the local variable. |
14698 */ | 14734 */ |
14699 List<String> get names => _names; | 14735 List<String> get names => _names; |
14700 | 14736 |
14701 /** | 14737 /** |
14702 * The proposed names for the local variable. | 14738 * The proposed names for the local variable. |
14703 */ | 14739 */ |
14704 void set names(List<String> value) { | 14740 void set names(List<String> value) { |
14705 assert(value != null); | 14741 assert(value != null); |
14706 this._names = value; | 14742 this._names = value; |
(...skipping 26 matching lines...) Expand all Loading... |
14733 * The lengths of the expressions that would be replaced by a reference to | 14769 * The lengths of the expressions that would be replaced by a reference to |
14734 * the variable. The lengths correspond to the offsets. In other words, for a | 14770 * the variable. The lengths correspond to the offsets. In other words, for a |
14735 * given expression, if the offset of that expression is offsets[i], then the | 14771 * given expression, if the offset of that expression is offsets[i], then the |
14736 * length of that expression is lengths[i]. | 14772 * length of that expression is lengths[i]. |
14737 */ | 14773 */ |
14738 void set lengths(List<int> value) { | 14774 void set lengths(List<int> value) { |
14739 assert(value != null); | 14775 assert(value != null); |
14740 this._lengths = value; | 14776 this._lengths = value; |
14741 } | 14777 } |
14742 | 14778 |
14743 ExtractLocalVariableFeedback(List<String> names, List<int> offsets, List<int>
lengths) { | 14779 ExtractLocalVariableFeedback(List<int> coveringExpressionOffsets, List<int> co
veringExpressionLengths, List<String> names, List<int> offsets, List<int> length
s) { |
| 14780 this.coveringExpressionOffsets = coveringExpressionOffsets; |
| 14781 this.coveringExpressionLengths = coveringExpressionLengths; |
14744 this.names = names; | 14782 this.names = names; |
14745 this.offsets = offsets; | 14783 this.offsets = offsets; |
14746 this.lengths = lengths; | 14784 this.lengths = lengths; |
14747 } | 14785 } |
14748 | 14786 |
14749 factory ExtractLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { | 14787 factory ExtractLocalVariableFeedback.fromJson(JsonDecoder jsonDecoder, String
jsonPath, Object json) { |
14750 if (json == null) { | 14788 if (json == null) { |
14751 json = {}; | 14789 json = {}; |
14752 } | 14790 } |
14753 if (json is Map) { | 14791 if (json is Map) { |
| 14792 List<int> coveringExpressionOffsets; |
| 14793 if (json.containsKey("coveringExpressionOffsets")) { |
| 14794 coveringExpressionOffsets = jsonDecoder._decodeList(jsonPath + ".coverin
gExpressionOffsets", json["coveringExpressionOffsets"], jsonDecoder._decodeInt); |
| 14795 } else { |
| 14796 throw jsonDecoder.missingKey(jsonPath, "coveringExpressionOffsets"); |
| 14797 } |
| 14798 List<int> coveringExpressionLengths; |
| 14799 if (json.containsKey("coveringExpressionLengths")) { |
| 14800 coveringExpressionLengths = jsonDecoder._decodeList(jsonPath + ".coverin
gExpressionLengths", json["coveringExpressionLengths"], jsonDecoder._decodeInt); |
| 14801 } else { |
| 14802 throw jsonDecoder.missingKey(jsonPath, "coveringExpressionLengths"); |
| 14803 } |
14754 List<String> names; | 14804 List<String> names; |
14755 if (json.containsKey("names")) { | 14805 if (json.containsKey("names")) { |
14756 names = jsonDecoder._decodeList(jsonPath + ".names", json["names"], json
Decoder._decodeString); | 14806 names = jsonDecoder._decodeList(jsonPath + ".names", json["names"], json
Decoder._decodeString); |
14757 } else { | 14807 } else { |
14758 throw jsonDecoder.missingKey(jsonPath, "names"); | 14808 throw jsonDecoder.missingKey(jsonPath, "names"); |
14759 } | 14809 } |
14760 List<int> offsets; | 14810 List<int> offsets; |
14761 if (json.containsKey("offsets")) { | 14811 if (json.containsKey("offsets")) { |
14762 offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"]
, jsonDecoder._decodeInt); | 14812 offsets = jsonDecoder._decodeList(jsonPath + ".offsets", json["offsets"]
, jsonDecoder._decodeInt); |
14763 } else { | 14813 } else { |
14764 throw jsonDecoder.missingKey(jsonPath, "offsets"); | 14814 throw jsonDecoder.missingKey(jsonPath, "offsets"); |
14765 } | 14815 } |
14766 List<int> lengths; | 14816 List<int> lengths; |
14767 if (json.containsKey("lengths")) { | 14817 if (json.containsKey("lengths")) { |
14768 lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"]
, jsonDecoder._decodeInt); | 14818 lengths = jsonDecoder._decodeList(jsonPath + ".lengths", json["lengths"]
, jsonDecoder._decodeInt); |
14769 } else { | 14819 } else { |
14770 throw jsonDecoder.missingKey(jsonPath, "lengths"); | 14820 throw jsonDecoder.missingKey(jsonPath, "lengths"); |
14771 } | 14821 } |
14772 return new ExtractLocalVariableFeedback(names, offsets, lengths); | 14822 return new ExtractLocalVariableFeedback(coveringExpressionOffsets, coverin
gExpressionLengths, names, offsets, lengths); |
14773 } else { | 14823 } else { |
14774 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable feedback", json
); | 14824 throw jsonDecoder.mismatch(jsonPath, "extractLocalVariable feedback", json
); |
14775 } | 14825 } |
14776 } | 14826 } |
14777 | 14827 |
14778 Map<String, dynamic> toJson() { | 14828 Map<String, dynamic> toJson() { |
14779 Map<String, dynamic> result = {}; | 14829 Map<String, dynamic> result = {}; |
| 14830 result["coveringExpressionOffsets"] = coveringExpressionOffsets; |
| 14831 result["coveringExpressionLengths"] = coveringExpressionLengths; |
14780 result["names"] = names; | 14832 result["names"] = names; |
14781 result["offsets"] = offsets; | 14833 result["offsets"] = offsets; |
14782 result["lengths"] = lengths; | 14834 result["lengths"] = lengths; |
14783 return result; | 14835 return result; |
14784 } | 14836 } |
14785 | 14837 |
14786 @override | 14838 @override |
14787 String toString() => JSON.encode(toJson()); | 14839 String toString() => JSON.encode(toJson()); |
14788 | 14840 |
14789 @override | 14841 @override |
14790 bool operator==(other) { | 14842 bool operator==(other) { |
14791 if (other is ExtractLocalVariableFeedback) { | 14843 if (other is ExtractLocalVariableFeedback) { |
14792 return _listEqual(names, other.names, (String a, String b) => a == b) && | 14844 return _listEqual(coveringExpressionOffsets, other.coveringExpressionOffse
ts, (int a, int b) => a == b) && |
| 14845 _listEqual(coveringExpressionLengths, other.coveringExpressionLengths,
(int a, int b) => a == b) && |
| 14846 _listEqual(names, other.names, (String a, String b) => a == b) && |
14793 _listEqual(offsets, other.offsets, (int a, int b) => a == b) && | 14847 _listEqual(offsets, other.offsets, (int a, int b) => a == b) && |
14794 _listEqual(lengths, other.lengths, (int a, int b) => a == b); | 14848 _listEqual(lengths, other.lengths, (int a, int b) => a == b); |
14795 } | 14849 } |
14796 return false; | 14850 return false; |
14797 } | 14851 } |
14798 | 14852 |
14799 @override | 14853 @override |
14800 int get hashCode { | 14854 int get hashCode { |
14801 int hash = 0; | 14855 int hash = 0; |
| 14856 hash = _JenkinsSmiHash.combine(hash, coveringExpressionOffsets.hashCode); |
| 14857 hash = _JenkinsSmiHash.combine(hash, coveringExpressionLengths.hashCode); |
14802 hash = _JenkinsSmiHash.combine(hash, names.hashCode); | 14858 hash = _JenkinsSmiHash.combine(hash, names.hashCode); |
14803 hash = _JenkinsSmiHash.combine(hash, offsets.hashCode); | 14859 hash = _JenkinsSmiHash.combine(hash, offsets.hashCode); |
14804 hash = _JenkinsSmiHash.combine(hash, lengths.hashCode); | 14860 hash = _JenkinsSmiHash.combine(hash, lengths.hashCode); |
14805 return _JenkinsSmiHash.finish(hash); | 14861 return _JenkinsSmiHash.finish(hash); |
14806 } | 14862 } |
14807 } | 14863 } |
14808 | 14864 |
14809 /** | 14865 /** |
14810 * extractLocalVariable options | 14866 * extractLocalVariable options |
14811 * | 14867 * |
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16025 return false; | 16081 return false; |
16026 } | 16082 } |
16027 | 16083 |
16028 @override | 16084 @override |
16029 int get hashCode { | 16085 int get hashCode { |
16030 int hash = 0; | 16086 int hash = 0; |
16031 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); | 16087 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); |
16032 return _JenkinsSmiHash.finish(hash); | 16088 return _JenkinsSmiHash.finish(hash); |
16033 } | 16089 } |
16034 } | 16090 } |
OLD | NEW |