Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 482573004: Change analysis server protocol to omit empty lists when optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify constructor invocations. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/spec/generate_files". 7 // "pkg/analysis_server/spec/generate_files".
8 8
9 part of protocol2; 9 part of protocol2;
10 10
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 * requested. The index of other elements of the list is unspecified, but 2492 * requested. The index of other elements of the list is unspecified, but
2493 * correspond to the integers used to reference supertype and subtype items 2493 * correspond to the integers used to reference supertype and subtype items
2494 * within the items. 2494 * within the items.
2495 * 2495 *
2496 * This field will be absent if the code at the given file and offset does 2496 * This field will be absent if the code at the given file and offset does
2497 * not represent a type, or if the file has not been sufficiently analyzed to 2497 * not represent a type, or if the file has not been sufficiently analyzed to
2498 * allow a type hierarchy to be produced. 2498 * allow a type hierarchy to be produced.
2499 */ 2499 */
2500 List<TypeHierarchyItem> hierarchyItems; 2500 List<TypeHierarchyItem> hierarchyItems;
2501 2501
2502 SearchGetTypeHierarchyResult({this.hierarchyItems}); 2502 SearchGetTypeHierarchyResult({this.hierarchyItems}) {
2503 if (hierarchyItems == null) {
2504 hierarchyItems = <TypeHierarchyItem>[];
2505 }
2506 }
2503 2507
2504 factory SearchGetTypeHierarchyResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 2508 factory SearchGetTypeHierarchyResult.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
2505 if (json == null) { 2509 if (json == null) {
2506 json = {}; 2510 json = {};
2507 } 2511 }
2508 if (json is Map) { 2512 if (json is Map) {
2509 List<TypeHierarchyItem> hierarchyItems; 2513 List<TypeHierarchyItem> hierarchyItems;
2510 if (json.containsKey("hierarchyItems")) { 2514 if (json.containsKey("hierarchyItems")) {
2511 hierarchyItems = jsonDecoder._decodeList(jsonPath + ".hierarchyItems", j son["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.f romJson(jsonDecoder, jsonPath, json)); 2515 hierarchyItems = jsonDecoder._decodeList(jsonPath + ".hierarchyItems", j son["hierarchyItems"], (String jsonPath, Object json) => new TypeHierarchyItem.f romJson(jsonDecoder, jsonPath, json));
2516 } else {
2517 hierarchyItems = <TypeHierarchyItem>[];
2512 } 2518 }
2513 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems); 2519 return new SearchGetTypeHierarchyResult(hierarchyItems: hierarchyItems);
2514 } else { 2520 } else {
2515 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result"); 2521 throw jsonDecoder.mismatch(jsonPath, "search.getTypeHierarchy result");
2516 } 2522 }
2517 } 2523 }
2518 2524
2519 factory SearchGetTypeHierarchyResult.fromResponse(Response response) { 2525 factory SearchGetTypeHierarchyResult.fromResponse(Response response) {
2520 return new SearchGetTypeHierarchyResult.fromJson( 2526 return new SearchGetTypeHierarchyResult.fromJson(
2521 new ResponseDecoder(), "result", response.result); 2527 new ResponseDecoder(), "result", response.result);
2522 } 2528 }
2523 2529
2524 Map<String, dynamic> toJson() { 2530 Map<String, dynamic> toJson() {
2525 Map<String, dynamic> result = {}; 2531 Map<String, dynamic> result = {};
2526 if (hierarchyItems != null) { 2532 if (hierarchyItems.isNotEmpty) {
2527 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()).toList(); 2533 result["hierarchyItems"] = hierarchyItems.map((TypeHierarchyItem value) => value.toJson()).toList();
2528 } 2534 }
2529 return result; 2535 return result;
2530 } 2536 }
2531 2537
2532 Response toResponse(String id) { 2538 Response toResponse(String id) {
2533 return new Response(id, result: toJson()); 2539 return new Response(id, result: toJson());
2534 } 2540 }
2535 2541
2536 @override 2542 @override
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
3303 /** 3309 /**
3304 * The ids of source edits that are not known to be valid. An edit is not 3310 * The ids of source edits that are not known to be valid. An edit is not
3305 * known to be valid if there was insufficient type information for the 3311 * known to be valid if there was insufficient type information for the
3306 * server to be able to determine whether or not the code needs to be 3312 * server to be able to determine whether or not the code needs to be
3307 * modified, such as when a member is being renamed and there is a reference 3313 * modified, such as when a member is being renamed and there is a reference
3308 * to a member from an unknown type. This field will be omitted if the change 3314 * to a member from an unknown type. This field will be omitted if the change
3309 * field is omitted or if there are no potential edits for the refactoring. 3315 * field is omitted or if there are no potential edits for the refactoring.
3310 */ 3316 */
3311 List<String> potentialEdits; 3317 List<String> potentialEdits;
3312 3318
3313 EditGetRefactoringResult(this.status, {this.feedback, this.change, this.potent ialEdits}); 3319 EditGetRefactoringResult(this.status, {this.feedback, this.change, this.potent ialEdits}) {
3320 if (potentialEdits == null) {
3321 potentialEdits = <String>[];
3322 }
3323 }
3314 3324
3315 factory EditGetRefactoringResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 3325 factory EditGetRefactoringResult.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) {
3316 if (json == null) { 3326 if (json == null) {
3317 json = {}; 3327 json = {};
3318 } 3328 }
3319 if (json is Map) { 3329 if (json is Map) {
3320 List<RefactoringProblem> status; 3330 List<RefactoringProblem> status;
3321 if (json.containsKey("status")) { 3331 if (json.containsKey("status")) {
3322 status = jsonDecoder._decodeList(jsonPath + ".status", json["status"], ( String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, js onPath, json)); 3332 status = jsonDecoder._decodeList(jsonPath + ".status", json["status"], ( String jsonPath, Object json) => new RefactoringProblem.fromJson(jsonDecoder, js onPath, json));
3323 } else { 3333 } else {
3324 throw jsonDecoder.missingKey(jsonPath, "status"); 3334 throw jsonDecoder.missingKey(jsonPath, "status");
3325 } 3335 }
3326 Object feedback; 3336 Object feedback;
3327 if (json.containsKey("feedback")) { 3337 if (json.containsKey("feedback")) {
3328 feedback = json["feedback"]; 3338 feedback = json["feedback"];
3329 } 3339 }
3330 SourceChange change; 3340 SourceChange change;
3331 if (json.containsKey("change")) { 3341 if (json.containsKey("change")) {
3332 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]); 3342 change = new SourceChange.fromJson(jsonDecoder, jsonPath + ".change", js on["change"]);
3333 } 3343 }
3334 List<String> potentialEdits; 3344 List<String> potentialEdits;
3335 if (json.containsKey("potentialEdits")) { 3345 if (json.containsKey("potentialEdits")) {
3336 potentialEdits = jsonDecoder._decodeList(jsonPath + ".potentialEdits", j son["potentialEdits"], jsonDecoder._decodeString); 3346 potentialEdits = jsonDecoder._decodeList(jsonPath + ".potentialEdits", j son["potentialEdits"], jsonDecoder._decodeString);
3347 } else {
3348 potentialEdits = <String>[];
3337 } 3349 }
3338 return new EditGetRefactoringResult(status, feedback: feedback, change: ch ange, potentialEdits: potentialEdits); 3350 return new EditGetRefactoringResult(status, feedback: feedback, change: ch ange, potentialEdits: potentialEdits);
3339 } else { 3351 } else {
3340 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result"); 3352 throw jsonDecoder.mismatch(jsonPath, "edit.getRefactoring result");
3341 } 3353 }
3342 } 3354 }
3343 3355
3344 factory EditGetRefactoringResult.fromResponse(Response response) { 3356 factory EditGetRefactoringResult.fromResponse(Response response) {
3345 return new EditGetRefactoringResult.fromJson( 3357 return new EditGetRefactoringResult.fromJson(
3346 new ResponseDecoder(), "result", response.result); 3358 new ResponseDecoder(), "result", response.result);
3347 } 3359 }
3348 3360
3349 Map<String, dynamic> toJson() { 3361 Map<String, dynamic> toJson() {
3350 Map<String, dynamic> result = {}; 3362 Map<String, dynamic> result = {};
3351 result["status"] = status.map((RefactoringProblem value) => value.toJson()). toList(); 3363 result["status"] = status.map((RefactoringProblem value) => value.toJson()). toList();
3352 if (feedback != null) { 3364 if (feedback != null) {
3353 result["feedback"] = feedback; 3365 result["feedback"] = feedback;
3354 } 3366 }
3355 if (change != null) { 3367 if (change != null) {
3356 result["change"] = change.toJson(); 3368 result["change"] = change.toJson();
3357 } 3369 }
3358 if (potentialEdits != null) { 3370 if (potentialEdits.isNotEmpty) {
3359 result["potentialEdits"] = potentialEdits; 3371 result["potentialEdits"] = potentialEdits;
3360 } 3372 }
3361 return result; 3373 return result;
3362 } 3374 }
3363 3375
3364 Response toResponse(String id) { 3376 Response toResponse(String id) {
3365 return new Response(id, result: toJson()); 3377 return new Response(id, result: toJson());
3366 } 3378 }
3367 3379
3368 @override 3380 @override
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
4607 * argument list. 4619 * argument list.
4608 */ 4620 */
4609 String parameterName; 4621 String parameterName;
4610 4622
4611 /** 4623 /**
4612 * The type of the options parameter being suggested. This field is omitted 4624 * The type of the options parameter being suggested. This field is omitted
4613 * if the parameterName field is omitted. 4625 * if the parameterName field is omitted.
4614 */ 4626 */
4615 String parameterType; 4627 String parameterType;
4616 4628
4617 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum mary, this.docComplete, this.declaringType, this.returnType, this.parameterNames , this.parameterTypes, this.requiredParameterCount, this.positionalParameterCoun t, this.parameterName, this.parameterType}); 4629 CompletionSuggestion(this.kind, this.relevance, this.completion, this.selectio nOffset, this.selectionLength, this.isDeprecated, this.isPotential, {this.docSum mary, this.docComplete, this.declaringType, this.returnType, this.parameterNames , this.parameterTypes, this.requiredParameterCount, this.positionalParameterCoun t, this.parameterName, this.parameterType}) {
4630 if (parameterNames == null) {
4631 parameterNames = <String>[];
4632 }
4633 if (parameterTypes == null) {
4634 parameterTypes = <String>[];
4635 }
4636 }
4618 4637
4619 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) { 4638 factory CompletionSuggestion.fromJson(JsonDecoder jsonDecoder, String jsonPath , Object json) {
4620 if (json == null) { 4639 if (json == null) {
4621 json = {}; 4640 json = {};
4622 } 4641 }
4623 if (json is Map) { 4642 if (json is Map) {
4624 CompletionSuggestionKind kind; 4643 CompletionSuggestionKind kind;
4625 if (json.containsKey("kind")) { 4644 if (json.containsKey("kind")) {
4626 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k ind", json["kind"]); 4645 kind = new CompletionSuggestionKind.fromJson(jsonDecoder, jsonPath + ".k ind", json["kind"]);
4627 } else { 4646 } else {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
4675 if (json.containsKey("declaringType")) { 4694 if (json.containsKey("declaringType")) {
4676 declaringType = jsonDecoder._decodeString(jsonPath + ".declaringType", j son["declaringType"]); 4695 declaringType = jsonDecoder._decodeString(jsonPath + ".declaringType", j son["declaringType"]);
4677 } 4696 }
4678 String returnType; 4697 String returnType;
4679 if (json.containsKey("returnType")) { 4698 if (json.containsKey("returnType")) {
4680 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]); 4699 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]);
4681 } 4700 }
4682 List<String> parameterNames; 4701 List<String> parameterNames;
4683 if (json.containsKey("parameterNames")) { 4702 if (json.containsKey("parameterNames")) {
4684 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j son["parameterNames"], jsonDecoder._decodeString); 4703 parameterNames = jsonDecoder._decodeList(jsonPath + ".parameterNames", j son["parameterNames"], jsonDecoder._decodeString);
4704 } else {
4705 parameterNames = <String>[];
4685 } 4706 }
4686 List<String> parameterTypes; 4707 List<String> parameterTypes;
4687 if (json.containsKey("parameterTypes")) { 4708 if (json.containsKey("parameterTypes")) {
4688 parameterTypes = jsonDecoder._decodeList(jsonPath + ".parameterTypes", j son["parameterTypes"], jsonDecoder._decodeString); 4709 parameterTypes = jsonDecoder._decodeList(jsonPath + ".parameterTypes", j son["parameterTypes"], jsonDecoder._decodeString);
4710 } else {
4711 parameterTypes = <String>[];
4689 } 4712 }
4690 int requiredParameterCount; 4713 int requiredParameterCount;
4691 if (json.containsKey("requiredParameterCount")) { 4714 if (json.containsKey("requiredParameterCount")) {
4692 requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredPar ameterCount", json["requiredParameterCount"]); 4715 requiredParameterCount = jsonDecoder._decodeInt(jsonPath + ".requiredPar ameterCount", json["requiredParameterCount"]);
4693 } 4716 }
4694 int positionalParameterCount; 4717 int positionalParameterCount;
4695 if (json.containsKey("positionalParameterCount")) { 4718 if (json.containsKey("positionalParameterCount")) {
4696 positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positiona lParameterCount", json["positionalParameterCount"]); 4719 positionalParameterCount = jsonDecoder._decodeInt(jsonPath + ".positiona lParameterCount", json["positionalParameterCount"]);
4697 } 4720 }
4698 String parameterName; 4721 String parameterName;
(...skipping 24 matching lines...) Expand all
4723 } 4746 }
4724 if (docComplete != null) { 4747 if (docComplete != null) {
4725 result["docComplete"] = docComplete; 4748 result["docComplete"] = docComplete;
4726 } 4749 }
4727 if (declaringType != null) { 4750 if (declaringType != null) {
4728 result["declaringType"] = declaringType; 4751 result["declaringType"] = declaringType;
4729 } 4752 }
4730 if (returnType != null) { 4753 if (returnType != null) {
4731 result["returnType"] = returnType; 4754 result["returnType"] = returnType;
4732 } 4755 }
4733 if (parameterNames != null) { 4756 if (parameterNames.isNotEmpty) {
4734 result["parameterNames"] = parameterNames; 4757 result["parameterNames"] = parameterNames;
4735 } 4758 }
4736 if (parameterTypes != null) { 4759 if (parameterTypes.isNotEmpty) {
4737 result["parameterTypes"] = parameterTypes; 4760 result["parameterTypes"] = parameterTypes;
4738 } 4761 }
4739 if (requiredParameterCount != null) { 4762 if (requiredParameterCount != null) {
4740 result["requiredParameterCount"] = requiredParameterCount; 4763 result["requiredParameterCount"] = requiredParameterCount;
4741 } 4764 }
4742 if (positionalParameterCount != null) { 4765 if (positionalParameterCount != null) {
4743 result["positionalParameterCount"] = positionalParameterCount; 4766 result["positionalParameterCount"] = positionalParameterCount;
4744 } 4767 }
4745 if (parameterName != null) { 4768 if (parameterName != null) {
4746 result["parameterName"] = parameterName; 4769 result["parameterName"] = parameterName;
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
6873 * The length of the element. 6896 * The length of the element.
6874 */ 6897 */
6875 int length; 6898 int length;
6876 6899
6877 /** 6900 /**
6878 * The children of the node. The field will be omitted if the node has no 6901 * The children of the node. The field will be omitted if the node has no
6879 * children. 6902 * children.
6880 */ 6903 */
6881 List<Outline> children; 6904 List<Outline> children;
6882 6905
6883 Outline(this.element, this.offset, this.length, {this.children}); 6906 Outline(this.element, this.offset, this.length, {this.children}) {
6907 if (children == null) {
6908 children = <Outline>[];
6909 }
6910 }
6884 6911
6885 factory Outline.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) { 6912 factory Outline.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) {
6886 if (json == null) { 6913 if (json == null) {
6887 json = {}; 6914 json = {};
6888 } 6915 }
6889 if (json is Map) { 6916 if (json is Map) {
6890 Element element; 6917 Element element;
6891 if (json.containsKey("element")) { 6918 if (json.containsKey("element")) {
6892 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]); 6919 element = new Element.fromJson(jsonDecoder, jsonPath + ".element", json[ "element"]);
6893 } else { 6920 } else {
6894 throw jsonDecoder.missingKey(jsonPath, "element"); 6921 throw jsonDecoder.missingKey(jsonPath, "element");
6895 } 6922 }
6896 int offset; 6923 int offset;
6897 if (json.containsKey("offset")) { 6924 if (json.containsKey("offset")) {
6898 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); 6925 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
6899 } else { 6926 } else {
6900 throw jsonDecoder.missingKey(jsonPath, "offset"); 6927 throw jsonDecoder.missingKey(jsonPath, "offset");
6901 } 6928 }
6902 int length; 6929 int length;
6903 if (json.containsKey("length")) { 6930 if (json.containsKey("length")) {
6904 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); 6931 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
6905 } else { 6932 } else {
6906 throw jsonDecoder.missingKey(jsonPath, "length"); 6933 throw jsonDecoder.missingKey(jsonPath, "length");
6907 } 6934 }
6908 List<Outline> children; 6935 List<Outline> children;
6909 if (json.containsKey("children")) { 6936 if (json.containsKey("children")) {
6910 children = jsonDecoder._decodeList(jsonPath + ".children", json["childre n"], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPat h, json)); 6937 children = jsonDecoder._decodeList(jsonPath + ".children", json["childre n"], (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPat h, json));
6938 } else {
6939 children = <Outline>[];
6911 } 6940 }
6912 return new Outline(element, offset, length, children: children); 6941 return new Outline(element, offset, length, children: children);
6913 } else { 6942 } else {
6914 throw jsonDecoder.mismatch(jsonPath, "Outline"); 6943 throw jsonDecoder.mismatch(jsonPath, "Outline");
6915 } 6944 }
6916 } 6945 }
6917 6946
6918 Map<String, dynamic> toJson() { 6947 Map<String, dynamic> toJson() {
6919 Map<String, dynamic> result = {}; 6948 Map<String, dynamic> result = {};
6920 result["element"] = element.toJson(); 6949 result["element"] = element.toJson();
6921 result["offset"] = offset; 6950 result["offset"] = offset;
6922 result["length"] = length; 6951 result["length"] = length;
6923 if (children != null) { 6952 if (children.isNotEmpty) {
6924 result["children"] = children.map((Outline value) => value.toJson()).toLis t(); 6953 result["children"] = children.map((Outline value) => value.toJson()).toLis t();
6925 } 6954 }
6926 return result; 6955 return result;
6927 } 6956 }
6928 6957
6929 @override 6958 @override
6930 String toString() => JSON.encode(toJson()); 6959 String toString() => JSON.encode(toJson());
6931 6960
6932 @override 6961 @override
6933 bool operator==(other) { 6962 bool operator==(other) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
6979 */ 7008 */
6980 OverriddenMember superclassMember; 7009 OverriddenMember superclassMember;
6981 7010
6982 /** 7011 /**
6983 * The members inherited from interfaces that are overridden by the 7012 * The members inherited from interfaces that are overridden by the
6984 * overriding member. The field is omitted if there are no interface members, 7013 * overriding member. The field is omitted if there are no interface members,
6985 * in which case there must be a superclass member. 7014 * in which case there must be a superclass member.
6986 */ 7015 */
6987 List<OverriddenMember> interfaceMembers; 7016 List<OverriddenMember> interfaceMembers;
6988 7017
6989 Override(this.offset, this.length, {this.superclassMember, this.interfaceMembe rs}); 7018 Override(this.offset, this.length, {this.superclassMember, this.interfaceMembe rs}) {
7019 if (interfaceMembers == null) {
7020 interfaceMembers = <OverriddenMember>[];
7021 }
7022 }
6990 7023
6991 factory Override.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso n) { 7024 factory Override.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object jso n) {
6992 if (json == null) { 7025 if (json == null) {
6993 json = {}; 7026 json = {};
6994 } 7027 }
6995 if (json is Map) { 7028 if (json is Map) {
6996 int offset; 7029 int offset;
6997 if (json.containsKey("offset")) { 7030 if (json.containsKey("offset")) {
6998 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]); 7031 offset = jsonDecoder._decodeInt(jsonPath + ".offset", json["offset"]);
6999 } else { 7032 } else {
7000 throw jsonDecoder.missingKey(jsonPath, "offset"); 7033 throw jsonDecoder.missingKey(jsonPath, "offset");
7001 } 7034 }
7002 int length; 7035 int length;
7003 if (json.containsKey("length")) { 7036 if (json.containsKey("length")) {
7004 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]); 7037 length = jsonDecoder._decodeInt(jsonPath + ".length", json["length"]);
7005 } else { 7038 } else {
7006 throw jsonDecoder.missingKey(jsonPath, "length"); 7039 throw jsonDecoder.missingKey(jsonPath, "length");
7007 } 7040 }
7008 OverriddenMember superclassMember; 7041 OverriddenMember superclassMember;
7009 if (json.containsKey("superclassMember")) { 7042 if (json.containsKey("superclassMember")) {
7010 superclassMember = new OverriddenMember.fromJson(jsonDecoder, jsonPath + ".superclassMember", json["superclassMember"]); 7043 superclassMember = new OverriddenMember.fromJson(jsonDecoder, jsonPath + ".superclassMember", json["superclassMember"]);
7011 } 7044 }
7012 List<OverriddenMember> interfaceMembers; 7045 List<OverriddenMember> interfaceMembers;
7013 if (json.containsKey("interfaceMembers")) { 7046 if (json.containsKey("interfaceMembers")) {
7014 interfaceMembers = jsonDecoder._decodeList(jsonPath + ".interfaceMembers ", json["interfaceMembers"], (String jsonPath, Object json) => new OverriddenMem ber.fromJson(jsonDecoder, jsonPath, json)); 7047 interfaceMembers = jsonDecoder._decodeList(jsonPath + ".interfaceMembers ", json["interfaceMembers"], (String jsonPath, Object json) => new OverriddenMem ber.fromJson(jsonDecoder, jsonPath, json));
7048 } else {
7049 interfaceMembers = <OverriddenMember>[];
7015 } 7050 }
7016 return new Override(offset, length, superclassMember: superclassMember, in terfaceMembers: interfaceMembers); 7051 return new Override(offset, length, superclassMember: superclassMember, in terfaceMembers: interfaceMembers);
7017 } else { 7052 } else {
7018 throw jsonDecoder.mismatch(jsonPath, "Override"); 7053 throw jsonDecoder.mismatch(jsonPath, "Override");
7019 } 7054 }
7020 } 7055 }
7021 7056
7022 Map<String, dynamic> toJson() { 7057 Map<String, dynamic> toJson() {
7023 Map<String, dynamic> result = {}; 7058 Map<String, dynamic> result = {};
7024 result["offset"] = offset; 7059 result["offset"] = offset;
7025 result["length"] = length; 7060 result["length"] = length;
7026 if (superclassMember != null) { 7061 if (superclassMember != null) {
7027 result["superclassMember"] = superclassMember.toJson(); 7062 result["superclassMember"] = superclassMember.toJson();
7028 } 7063 }
7029 if (interfaceMembers != null) { 7064 if (interfaceMembers.isNotEmpty) {
7030 result["interfaceMembers"] = interfaceMembers.map((OverriddenMember value) => value.toJson()).toList(); 7065 result["interfaceMembers"] = interfaceMembers.map((OverriddenMember value) => value.toJson()).toList();
7031 } 7066 }
7032 return result; 7067 return result;
7033 } 7068 }
7034 7069
7035 @override 7070 @override
7036 String toString() => JSON.encode(toJson()); 7071 String toString() => JSON.encode(toJson());
7037 7072
7038 @override 7073 @override
7039 bool operator==(other) { 7074 bool operator==(other) {
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
9071 return false; 9106 return false;
9072 } 9107 }
9073 9108
9074 @override 9109 @override
9075 int get hashCode { 9110 int get hashCode {
9076 int hash = 0; 9111 int hash = 0;
9077 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 9112 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
9078 return _JenkinsSmiHash.finish(hash); 9113 return _JenkinsSmiHash.finish(hash);
9079 } 9114 }
9080 } 9115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698