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

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

Issue 990343002: Add an optional 'typeParameters' to Element. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update version. Created 5 years, 9 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/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 6414 matching lines...) Expand 10 before | Expand all | Expand 10 after
6425 /** 6425 /**
6426 * Element 6426 * Element
6427 * 6427 *
6428 * { 6428 * {
6429 * "kind": ElementKind 6429 * "kind": ElementKind
6430 * "name": String 6430 * "name": String
6431 * "location": optional Location 6431 * "location": optional Location
6432 * "flags": int 6432 * "flags": int
6433 * "parameters": optional String 6433 * "parameters": optional String
6434 * "returnType": optional String 6434 * "returnType": optional String
6435 * "typeParameters": optional String
6435 * } 6436 * }
6436 */ 6437 */
6437 class Element implements HasToJson { 6438 class Element implements HasToJson {
6438 static const int FLAG_ABSTRACT = 0x01; 6439 static const int FLAG_ABSTRACT = 0x01;
6439 static const int FLAG_CONST = 0x02; 6440 static const int FLAG_CONST = 0x02;
6440 static const int FLAG_FINAL = 0x04; 6441 static const int FLAG_FINAL = 0x04;
6441 static const int FLAG_STATIC = 0x08; 6442 static const int FLAG_STATIC = 0x08;
6442 static const int FLAG_PRIVATE = 0x10; 6443 static const int FLAG_PRIVATE = 0x10;
6443 static const int FLAG_DEPRECATED = 0x20; 6444 static const int FLAG_DEPRECATED = 0x20;
6444 6445
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
6490 */ 6491 */
6491 String parameters; 6492 String parameters;
6492 6493
6493 /** 6494 /**
6494 * The return type of the element. If the element is not a method or function 6495 * The return type of the element. If the element is not a method or function
6495 * this field will not be defined. If the element does not have a declared 6496 * this field will not be defined. If the element does not have a declared
6496 * return type, this field will contain an empty string. 6497 * return type, this field will contain an empty string.
6497 */ 6498 */
6498 String returnType; 6499 String returnType;
6499 6500
6500 Element(this.kind, this.name, this.flags, {this.location, this.parameters, thi s.returnType}); 6501 /**
6502 * The type parameter list for the element. If the element doesn't have type
6503 * parameters, this field will not be defined.
6504 */
6505 String typeParameters;
6506
6507 Element(this.kind, this.name, this.flags, {this.location, this.parameters, thi s.returnType, this.typeParameters});
6501 6508
6502 factory Element.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) { 6509 factory Element.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json ) {
6503 if (json == null) { 6510 if (json == null) {
6504 json = {}; 6511 json = {};
6505 } 6512 }
6506 if (json is Map) { 6513 if (json is Map) {
6507 ElementKind kind; 6514 ElementKind kind;
6508 if (json.containsKey("kind")) { 6515 if (json.containsKey("kind")) {
6509 kind = new ElementKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k ind"]); 6516 kind = new ElementKind.fromJson(jsonDecoder, jsonPath + ".kind", json["k ind"]);
6510 } else { 6517 } else {
(...skipping 16 matching lines...) Expand all
6527 throw jsonDecoder.missingKey(jsonPath, "flags"); 6534 throw jsonDecoder.missingKey(jsonPath, "flags");
6528 } 6535 }
6529 String parameters; 6536 String parameters;
6530 if (json.containsKey("parameters")) { 6537 if (json.containsKey("parameters")) {
6531 parameters = jsonDecoder._decodeString(jsonPath + ".parameters", json["p arameters"]); 6538 parameters = jsonDecoder._decodeString(jsonPath + ".parameters", json["p arameters"]);
6532 } 6539 }
6533 String returnType; 6540 String returnType;
6534 if (json.containsKey("returnType")) { 6541 if (json.containsKey("returnType")) {
6535 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]); 6542 returnType = jsonDecoder._decodeString(jsonPath + ".returnType", json["r eturnType"]);
6536 } 6543 }
6537 return new Element(kind, name, flags, location: location, parameters: para meters, returnType: returnType); 6544 String typeParameters;
6545 if (json.containsKey("typeParameters")) {
6546 typeParameters = jsonDecoder._decodeString(jsonPath + ".typeParameters", json["typeParameters"]);
6547 }
6548 return new Element(kind, name, flags, location: location, parameters: para meters, returnType: returnType, typeParameters: typeParameters);
6538 } else { 6549 } else {
6539 throw jsonDecoder.mismatch(jsonPath, "Element"); 6550 throw jsonDecoder.mismatch(jsonPath, "Element");
6540 } 6551 }
6541 } 6552 }
6542 6553
6543 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0; 6554 bool get isAbstract => (flags & FLAG_ABSTRACT) != 0;
6544 bool get isConst => (flags & FLAG_CONST) != 0; 6555 bool get isConst => (flags & FLAG_CONST) != 0;
6545 bool get isFinal => (flags & FLAG_FINAL) != 0; 6556 bool get isFinal => (flags & FLAG_FINAL) != 0;
6546 bool get isStatic => (flags & FLAG_STATIC) != 0; 6557 bool get isStatic => (flags & FLAG_STATIC) != 0;
6547 bool get isPrivate => (flags & FLAG_PRIVATE) != 0; 6558 bool get isPrivate => (flags & FLAG_PRIVATE) != 0;
6548 bool get isDeprecated => (flags & FLAG_DEPRECATED) != 0; 6559 bool get isDeprecated => (flags & FLAG_DEPRECATED) != 0;
6549 6560
6550 Map<String, dynamic> toJson() { 6561 Map<String, dynamic> toJson() {
6551 Map<String, dynamic> result = {}; 6562 Map<String, dynamic> result = {};
6552 result["kind"] = kind.toJson(); 6563 result["kind"] = kind.toJson();
6553 result["name"] = name; 6564 result["name"] = name;
6554 if (location != null) { 6565 if (location != null) {
6555 result["location"] = location.toJson(); 6566 result["location"] = location.toJson();
6556 } 6567 }
6557 result["flags"] = flags; 6568 result["flags"] = flags;
6558 if (parameters != null) { 6569 if (parameters != null) {
6559 result["parameters"] = parameters; 6570 result["parameters"] = parameters;
6560 } 6571 }
6561 if (returnType != null) { 6572 if (returnType != null) {
6562 result["returnType"] = returnType; 6573 result["returnType"] = returnType;
6563 } 6574 }
6575 if (typeParameters != null) {
6576 result["typeParameters"] = typeParameters;
6577 }
6564 return result; 6578 return result;
6565 } 6579 }
6566 6580
6567 @override 6581 @override
6568 String toString() => JSON.encode(toJson()); 6582 String toString() => JSON.encode(toJson());
6569 6583
6570 @override 6584 @override
6571 bool operator==(other) { 6585 bool operator==(other) {
6572 if (other is Element) { 6586 if (other is Element) {
6573 return kind == other.kind && 6587 return kind == other.kind &&
6574 name == other.name && 6588 name == other.name &&
6575 location == other.location && 6589 location == other.location &&
6576 flags == other.flags && 6590 flags == other.flags &&
6577 parameters == other.parameters && 6591 parameters == other.parameters &&
6578 returnType == other.returnType; 6592 returnType == other.returnType &&
6593 typeParameters == other.typeParameters;
6579 } 6594 }
6580 return false; 6595 return false;
6581 } 6596 }
6582 6597
6583 @override 6598 @override
6584 int get hashCode { 6599 int get hashCode {
6585 int hash = 0; 6600 int hash = 0;
6586 hash = _JenkinsSmiHash.combine(hash, kind.hashCode); 6601 hash = _JenkinsSmiHash.combine(hash, kind.hashCode);
6587 hash = _JenkinsSmiHash.combine(hash, name.hashCode); 6602 hash = _JenkinsSmiHash.combine(hash, name.hashCode);
6588 hash = _JenkinsSmiHash.combine(hash, location.hashCode); 6603 hash = _JenkinsSmiHash.combine(hash, location.hashCode);
6589 hash = _JenkinsSmiHash.combine(hash, flags.hashCode); 6604 hash = _JenkinsSmiHash.combine(hash, flags.hashCode);
6590 hash = _JenkinsSmiHash.combine(hash, parameters.hashCode); 6605 hash = _JenkinsSmiHash.combine(hash, parameters.hashCode);
6591 hash = _JenkinsSmiHash.combine(hash, returnType.hashCode); 6606 hash = _JenkinsSmiHash.combine(hash, returnType.hashCode);
6607 hash = _JenkinsSmiHash.combine(hash, typeParameters.hashCode);
6592 return _JenkinsSmiHash.finish(hash); 6608 return _JenkinsSmiHash.finish(hash);
6593 } 6609 }
6594 } 6610 }
6595 6611
6596 /** 6612 /**
6597 * ElementKind 6613 * ElementKind
6598 * 6614 *
6599 * enum { 6615 * enum {
6600 * CLASS 6616 * CLASS
6601 * CLASS_TYPE_ALIAS 6617 * CLASS_TYPE_ALIAS
(...skipping 4705 matching lines...) Expand 10 before | Expand all | Expand 10 after
11307 return false; 11323 return false;
11308 } 11324 }
11309 11325
11310 @override 11326 @override
11311 int get hashCode { 11327 int get hashCode {
11312 int hash = 0; 11328 int hash = 0;
11313 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 11329 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
11314 return _JenkinsSmiHash.finish(hash); 11330 return _JenkinsSmiHash.finish(hash);
11315 } 11331 }
11316 } 11332 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_outline.dart ('k') | pkg/analysis_server/lib/src/protocol_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698