OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:convert' hide JsonDecoder; | 9 import 'dart:convert' hide JsonDecoder; |
10 | 10 |
(...skipping 4690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4701 @override | 4701 @override |
4702 int get hashCode { | 4702 int get hashCode { |
4703 int hash = 0; | 4703 int hash = 0; |
4704 hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode); | 4704 hash = JenkinsSmiHash.combine(hash, deleteSource.hashCode); |
4705 hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode); | 4705 hash = JenkinsSmiHash.combine(hash, inlineAll.hashCode); |
4706 return JenkinsSmiHash.finish(hash); | 4706 return JenkinsSmiHash.finish(hash); |
4707 } | 4707 } |
4708 } | 4708 } |
4709 | 4709 |
4710 /** | 4710 /** |
| 4711 * kythe.getKytheEntries params |
| 4712 * |
| 4713 * { |
| 4714 * "file": FilePath |
| 4715 * } |
| 4716 * |
| 4717 * Clients may not extend, implement or mix-in this class. |
| 4718 */ |
| 4719 class KytheGetKytheEntriesParams implements RequestParams { |
| 4720 String _file; |
| 4721 |
| 4722 /** |
| 4723 * The file containing the code for which the Kythe Entry objects are being |
| 4724 * requested. |
| 4725 */ |
| 4726 String get file => _file; |
| 4727 |
| 4728 /** |
| 4729 * The file containing the code for which the Kythe Entry objects are being |
| 4730 * requested. |
| 4731 */ |
| 4732 void set file(String value) { |
| 4733 assert(value != null); |
| 4734 this._file = value; |
| 4735 } |
| 4736 |
| 4737 KytheGetKytheEntriesParams(String file) { |
| 4738 this.file = file; |
| 4739 } |
| 4740 |
| 4741 factory KytheGetKytheEntriesParams.fromJson( |
| 4742 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 4743 if (json == null) { |
| 4744 json = {}; |
| 4745 } |
| 4746 if (json is Map) { |
| 4747 String file; |
| 4748 if (json.containsKey("file")) { |
| 4749 file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); |
| 4750 } else { |
| 4751 throw jsonDecoder.mismatch(jsonPath, "file"); |
| 4752 } |
| 4753 return new KytheGetKytheEntriesParams(file); |
| 4754 } else { |
| 4755 throw jsonDecoder.mismatch( |
| 4756 jsonPath, "kythe.getKytheEntries params", json); |
| 4757 } |
| 4758 } |
| 4759 |
| 4760 factory KytheGetKytheEntriesParams.fromRequest(Request request) { |
| 4761 return new KytheGetKytheEntriesParams.fromJson( |
| 4762 new RequestDecoder(request), "params", request.params); |
| 4763 } |
| 4764 |
| 4765 @override |
| 4766 Map<String, dynamic> toJson() { |
| 4767 Map<String, dynamic> result = {}; |
| 4768 result["file"] = file; |
| 4769 return result; |
| 4770 } |
| 4771 |
| 4772 @override |
| 4773 Request toRequest(String id) { |
| 4774 return new Request(id, "kythe.getKytheEntries", toJson()); |
| 4775 } |
| 4776 |
| 4777 @override |
| 4778 String toString() => JSON.encode(toJson()); |
| 4779 |
| 4780 @override |
| 4781 bool operator ==(other) { |
| 4782 if (other is KytheGetKytheEntriesParams) { |
| 4783 return file == other.file; |
| 4784 } |
| 4785 return false; |
| 4786 } |
| 4787 |
| 4788 @override |
| 4789 int get hashCode { |
| 4790 int hash = 0; |
| 4791 hash = JenkinsSmiHash.combine(hash, file.hashCode); |
| 4792 return JenkinsSmiHash.finish(hash); |
| 4793 } |
| 4794 } |
| 4795 |
| 4796 /** |
| 4797 * kythe.getKytheEntries result |
| 4798 * |
| 4799 * { |
| 4800 * "entries": List<KytheEntry> |
| 4801 * "files": List<FilePath> |
| 4802 * } |
| 4803 * |
| 4804 * Clients may not extend, implement or mix-in this class. |
| 4805 */ |
| 4806 class KytheGetKytheEntriesResult implements ResponseResult { |
| 4807 List<KytheEntry> _entries; |
| 4808 |
| 4809 List<String> _files; |
| 4810 |
| 4811 /** |
| 4812 * The list of KytheEntry objects for the queried file. |
| 4813 */ |
| 4814 List<KytheEntry> get entries => _entries; |
| 4815 |
| 4816 /** |
| 4817 * The list of KytheEntry objects for the queried file. |
| 4818 */ |
| 4819 void set entries(List<KytheEntry> value) { |
| 4820 assert(value != null); |
| 4821 this._entries = value; |
| 4822 } |
| 4823 |
| 4824 /** |
| 4825 * The set of files paths that were required, but not in the file system, to |
| 4826 * give a complete and accurate Kythe graph for the file. This could be due |
| 4827 * to a referenced file that does not exist or generated files not being |
| 4828 * generated or passed before the call to "getKytheEntries". |
| 4829 */ |
| 4830 List<String> get files => _files; |
| 4831 |
| 4832 /** |
| 4833 * The set of files paths that were required, but not in the file system, to |
| 4834 * give a complete and accurate Kythe graph for the file. This could be due |
| 4835 * to a referenced file that does not exist or generated files not being |
| 4836 * generated or passed before the call to "getKytheEntries". |
| 4837 */ |
| 4838 void set files(List<String> value) { |
| 4839 assert(value != null); |
| 4840 this._files = value; |
| 4841 } |
| 4842 |
| 4843 KytheGetKytheEntriesResult(List<KytheEntry> entries, List<String> files) { |
| 4844 this.entries = entries; |
| 4845 this.files = files; |
| 4846 } |
| 4847 |
| 4848 factory KytheGetKytheEntriesResult.fromJson( |
| 4849 JsonDecoder jsonDecoder, String jsonPath, Object json) { |
| 4850 if (json == null) { |
| 4851 json = {}; |
| 4852 } |
| 4853 if (json is Map) { |
| 4854 List<KytheEntry> entries; |
| 4855 if (json.containsKey("entries")) { |
| 4856 entries = jsonDecoder.decodeList( |
| 4857 jsonPath + ".entries", |
| 4858 json["entries"], |
| 4859 (String jsonPath, Object json) => |
| 4860 new KytheEntry.fromJson(jsonDecoder, jsonPath, json)); |
| 4861 } else { |
| 4862 throw jsonDecoder.mismatch(jsonPath, "entries"); |
| 4863 } |
| 4864 List<String> files; |
| 4865 if (json.containsKey("files")) { |
| 4866 files = jsonDecoder.decodeList( |
| 4867 jsonPath + ".files", json["files"], jsonDecoder.decodeString); |
| 4868 } else { |
| 4869 throw jsonDecoder.mismatch(jsonPath, "files"); |
| 4870 } |
| 4871 return new KytheGetKytheEntriesResult(entries, files); |
| 4872 } else { |
| 4873 throw jsonDecoder.mismatch( |
| 4874 jsonPath, "kythe.getKytheEntries result", json); |
| 4875 } |
| 4876 } |
| 4877 |
| 4878 factory KytheGetKytheEntriesResult.fromResponse(Response response) { |
| 4879 return new KytheGetKytheEntriesResult.fromJson( |
| 4880 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), |
| 4881 "result", |
| 4882 response.result); |
| 4883 } |
| 4884 |
| 4885 @override |
| 4886 Map<String, dynamic> toJson() { |
| 4887 Map<String, dynamic> result = {}; |
| 4888 result["entries"] = |
| 4889 entries.map((KytheEntry value) => value.toJson()).toList(); |
| 4890 result["files"] = files; |
| 4891 return result; |
| 4892 } |
| 4893 |
| 4894 @override |
| 4895 Response toResponse(String id, int requestTime) { |
| 4896 return new Response(id, requestTime, result: toJson()); |
| 4897 } |
| 4898 |
| 4899 @override |
| 4900 String toString() => JSON.encode(toJson()); |
| 4901 |
| 4902 @override |
| 4903 bool operator ==(other) { |
| 4904 if (other is KytheGetKytheEntriesResult) { |
| 4905 return listEqual( |
| 4906 entries, other.entries, (KytheEntry a, KytheEntry b) => a == b) && |
| 4907 listEqual(files, other.files, (String a, String b) => a == b); |
| 4908 } |
| 4909 return false; |
| 4910 } |
| 4911 |
| 4912 @override |
| 4913 int get hashCode { |
| 4914 int hash = 0; |
| 4915 hash = JenkinsSmiHash.combine(hash, entries.hashCode); |
| 4916 hash = JenkinsSmiHash.combine(hash, files.hashCode); |
| 4917 return JenkinsSmiHash.finish(hash); |
| 4918 } |
| 4919 } |
| 4920 |
| 4921 /** |
4711 * moveFile feedback | 4922 * moveFile feedback |
4712 * | 4923 * |
4713 * Clients may not extend, implement or mix-in this class. | 4924 * Clients may not extend, implement or mix-in this class. |
4714 */ | 4925 */ |
4715 class MoveFileFeedback extends RefactoringFeedback implements HasToJson { | 4926 class MoveFileFeedback extends RefactoringFeedback implements HasToJson { |
4716 @override | 4927 @override |
4717 bool operator ==(other) { | 4928 bool operator ==(other) { |
4718 if (other is MoveFileFeedback) { | 4929 if (other is MoveFileFeedback) { |
4719 return true; | 4930 return true; |
4720 } | 4931 } |
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6171 } | 6382 } |
6172 } | 6383 } |
6173 throw jsonDecoder.mismatch(jsonPath, "WatchEventType", json); | 6384 throw jsonDecoder.mismatch(jsonPath, "WatchEventType", json); |
6174 } | 6385 } |
6175 | 6386 |
6176 @override | 6387 @override |
6177 String toString() => "WatchEventType.$name"; | 6388 String toString() => "WatchEventType.$name"; |
6178 | 6389 |
6179 String toJson() => name; | 6390 String toJson() => name; |
6180 } | 6391 } |
OLD | NEW |