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 7403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7414 | 7414 |
7415 @override | 7415 @override |
7416 int get hashCode { | 7416 int get hashCode { |
7417 int hash = 0; | 7417 int hash = 0; |
7418 hash = JenkinsSmiHash.combine(hash, file.hashCode); | 7418 hash = JenkinsSmiHash.combine(hash, file.hashCode); |
7419 hash = JenkinsSmiHash.combine(hash, kind.hashCode); | 7419 hash = JenkinsSmiHash.combine(hash, kind.hashCode); |
7420 hash = JenkinsSmiHash.combine(hash, referencedFiles.hashCode); | 7420 hash = JenkinsSmiHash.combine(hash, referencedFiles.hashCode); |
7421 return JenkinsSmiHash.finish(hash); | 7421 return JenkinsSmiHash.finish(hash); |
7422 } | 7422 } |
7423 } | 7423 } |
| 7424 /** |
| 7425 * experimental.getDiagnostics params |
| 7426 * |
| 7427 * Clients may not extend, implement or mix-in this class. |
| 7428 */ |
| 7429 class ExperimentalGetDiagnosticsParams { |
| 7430 Request toRequest(String id) { |
| 7431 return new Request(id, "experimental.getDiagnostics", null); |
| 7432 } |
| 7433 |
| 7434 @override |
| 7435 bool operator==(other) { |
| 7436 if (other is ExperimentalGetDiagnosticsParams) { |
| 7437 return true; |
| 7438 } |
| 7439 return false; |
| 7440 } |
| 7441 |
| 7442 @override |
| 7443 int get hashCode { |
| 7444 return 876666064; |
| 7445 } |
| 7446 } |
| 7447 |
| 7448 /** |
| 7449 * experimental.getDiagnostics result |
| 7450 * |
| 7451 * { |
| 7452 * "contexts": List<ContextData> |
| 7453 * } |
| 7454 * |
| 7455 * Clients may not extend, implement or mix-in this class. |
| 7456 */ |
| 7457 class ExperimentalGetDiagnosticsResult implements HasToJson { |
| 7458 List<ContextData> _contexts; |
| 7459 |
| 7460 /** |
| 7461 * The list of analysis contexts. |
| 7462 */ |
| 7463 List<ContextData> get contexts => _contexts; |
| 7464 |
| 7465 /** |
| 7466 * The list of analysis contexts. |
| 7467 */ |
| 7468 void set contexts(List<ContextData> value) { |
| 7469 assert(value != null); |
| 7470 this._contexts = value; |
| 7471 } |
| 7472 |
| 7473 ExperimentalGetDiagnosticsResult(List<ContextData> contexts) { |
| 7474 this.contexts = contexts; |
| 7475 } |
| 7476 |
| 7477 factory ExperimentalGetDiagnosticsResult.fromJson(JsonDecoder jsonDecoder, Str
ing jsonPath, Object json) { |
| 7478 if (json == null) { |
| 7479 json = {}; |
| 7480 } |
| 7481 if (json is Map) { |
| 7482 List<ContextData> contexts; |
| 7483 if (json.containsKey("contexts")) { |
| 7484 contexts = jsonDecoder.decodeList(jsonPath + ".contexts", json["contexts
"], (String jsonPath, Object json) => new ContextData.fromJson(jsonDecoder, json
Path, json)); |
| 7485 } else { |
| 7486 throw jsonDecoder.missingKey(jsonPath, "contexts"); |
| 7487 } |
| 7488 return new ExperimentalGetDiagnosticsResult(contexts); |
| 7489 } else { |
| 7490 throw jsonDecoder.mismatch(jsonPath, "experimental.getDiagnostics result",
json); |
| 7491 } |
| 7492 } |
| 7493 |
| 7494 factory ExperimentalGetDiagnosticsResult.fromResponse(Response response) { |
| 7495 return new ExperimentalGetDiagnosticsResult.fromJson( |
| 7496 new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)), "
result", response._result); |
| 7497 } |
| 7498 |
| 7499 Map<String, dynamic> toJson() { |
| 7500 Map<String, dynamic> result = {}; |
| 7501 result["contexts"] = contexts.map((ContextData value) => value.toJson()).toL
ist(); |
| 7502 return result; |
| 7503 } |
| 7504 |
| 7505 Response toResponse(String id) { |
| 7506 return new Response(id, result: toJson()); |
| 7507 } |
| 7508 |
| 7509 @override |
| 7510 String toString() => JSON.encode(toJson()); |
| 7511 |
| 7512 @override |
| 7513 bool operator==(other) { |
| 7514 if (other is ExperimentalGetDiagnosticsResult) { |
| 7515 return listEqual(contexts, other.contexts, (ContextData a, ContextData b)
=> a == b); |
| 7516 } |
| 7517 return false; |
| 7518 } |
| 7519 |
| 7520 @override |
| 7521 int get hashCode { |
| 7522 int hash = 0; |
| 7523 hash = JenkinsSmiHash.combine(hash, contexts.hashCode); |
| 7524 return JenkinsSmiHash.finish(hash); |
| 7525 } |
| 7526 } |
7424 | 7527 |
7425 /** | 7528 /** |
7426 * AddContentOverlay | 7529 * AddContentOverlay |
7427 * | 7530 * |
7428 * { | 7531 * { |
7429 * "type": "add" | 7532 * "type": "add" |
7430 * "content": String | 7533 * "content": String |
7431 * } | 7534 * } |
7432 * | 7535 * |
7433 * Clients may not extend, implement or mix-in this class. | 7536 * Clients may not extend, implement or mix-in this class. |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9160 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestionKind", json); | 9263 throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestionKind", json); |
9161 } | 9264 } |
9162 | 9265 |
9163 @override | 9266 @override |
9164 String toString() => "CompletionSuggestionKind.$name"; | 9267 String toString() => "CompletionSuggestionKind.$name"; |
9165 | 9268 |
9166 String toJson() => name; | 9269 String toJson() => name; |
9167 } | 9270 } |
9168 | 9271 |
9169 /** | 9272 /** |
| 9273 * ContextData |
| 9274 * |
| 9275 * { |
| 9276 * "name": String |
| 9277 * "explicitFileCount": int |
| 9278 * "implicitFileCount": int |
| 9279 * "workItemQueueLength": int |
| 9280 * "cacheEntryExceptions": List<String> |
| 9281 * } |
| 9282 * |
| 9283 * Clients may not extend, implement or mix-in this class. |
| 9284 */ |
| 9285 class ContextData implements HasToJson { |
| 9286 String _name; |
| 9287 |
| 9288 int _explicitFileCount; |
| 9289 |
| 9290 int _implicitFileCount; |
| 9291 |
| 9292 int _workItemQueueLength; |
| 9293 |
| 9294 List<String> _cacheEntryExceptions; |
| 9295 |
| 9296 /** |
| 9297 * The name of the context. |
| 9298 */ |
| 9299 String get name => _name; |
| 9300 |
| 9301 /** |
| 9302 * The name of the context. |
| 9303 */ |
| 9304 void set name(String value) { |
| 9305 assert(value != null); |
| 9306 this._name = value; |
| 9307 } |
| 9308 |
| 9309 /** |
| 9310 * Explicitly analyzed files. |
| 9311 */ |
| 9312 int get explicitFileCount => _explicitFileCount; |
| 9313 |
| 9314 /** |
| 9315 * Explicitly analyzed files. |
| 9316 */ |
| 9317 void set explicitFileCount(int value) { |
| 9318 assert(value != null); |
| 9319 this._explicitFileCount = value; |
| 9320 } |
| 9321 |
| 9322 /** |
| 9323 * Implicitly analyzed files. |
| 9324 */ |
| 9325 int get implicitFileCount => _implicitFileCount; |
| 9326 |
| 9327 /** |
| 9328 * Implicitly analyzed files. |
| 9329 */ |
| 9330 void set implicitFileCount(int value) { |
| 9331 assert(value != null); |
| 9332 this._implicitFileCount = value; |
| 9333 } |
| 9334 |
| 9335 /** |
| 9336 * The number of work items in the queue. |
| 9337 */ |
| 9338 int get workItemQueueLength => _workItemQueueLength; |
| 9339 |
| 9340 /** |
| 9341 * The number of work items in the queue. |
| 9342 */ |
| 9343 void set workItemQueueLength(int value) { |
| 9344 assert(value != null); |
| 9345 this._workItemQueueLength = value; |
| 9346 } |
| 9347 |
| 9348 /** |
| 9349 * Exceptions associated with cache entries. |
| 9350 */ |
| 9351 List<String> get cacheEntryExceptions => _cacheEntryExceptions; |
| 9352 |
| 9353 /** |
| 9354 * Exceptions associated with cache entries. |
| 9355 */ |
| 9356 void set cacheEntryExceptions(List<String> value) { |
| 9357 assert(value != null); |
| 9358 this._cacheEntryExceptions = value; |
| 9359 } |
| 9360 |
| 9361 ContextData(String name, int explicitFileCount, int implicitFileCount, int wor
kItemQueueLength, List<String> cacheEntryExceptions) { |
| 9362 this.name = name; |
| 9363 this.explicitFileCount = explicitFileCount; |
| 9364 this.implicitFileCount = implicitFileCount; |
| 9365 this.workItemQueueLength = workItemQueueLength; |
| 9366 this.cacheEntryExceptions = cacheEntryExceptions; |
| 9367 } |
| 9368 |
| 9369 factory ContextData.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object
json) { |
| 9370 if (json == null) { |
| 9371 json = {}; |
| 9372 } |
| 9373 if (json is Map) { |
| 9374 String name; |
| 9375 if (json.containsKey("name")) { |
| 9376 name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]); |
| 9377 } else { |
| 9378 throw jsonDecoder.missingKey(jsonPath, "name"); |
| 9379 } |
| 9380 int explicitFileCount; |
| 9381 if (json.containsKey("explicitFileCount")) { |
| 9382 explicitFileCount = jsonDecoder.decodeInt(jsonPath + ".explicitFileCount
", json["explicitFileCount"]); |
| 9383 } else { |
| 9384 throw jsonDecoder.missingKey(jsonPath, "explicitFileCount"); |
| 9385 } |
| 9386 int implicitFileCount; |
| 9387 if (json.containsKey("implicitFileCount")) { |
| 9388 implicitFileCount = jsonDecoder.decodeInt(jsonPath + ".implicitFileCount
", json["implicitFileCount"]); |
| 9389 } else { |
| 9390 throw jsonDecoder.missingKey(jsonPath, "implicitFileCount"); |
| 9391 } |
| 9392 int workItemQueueLength; |
| 9393 if (json.containsKey("workItemQueueLength")) { |
| 9394 workItemQueueLength = jsonDecoder.decodeInt(jsonPath + ".workItemQueueLe
ngth", json["workItemQueueLength"]); |
| 9395 } else { |
| 9396 throw jsonDecoder.missingKey(jsonPath, "workItemQueueLength"); |
| 9397 } |
| 9398 List<String> cacheEntryExceptions; |
| 9399 if (json.containsKey("cacheEntryExceptions")) { |
| 9400 cacheEntryExceptions = jsonDecoder.decodeList(jsonPath + ".cacheEntryExc
eptions", json["cacheEntryExceptions"], jsonDecoder.decodeString); |
| 9401 } else { |
| 9402 throw jsonDecoder.missingKey(jsonPath, "cacheEntryExceptions"); |
| 9403 } |
| 9404 return new ContextData(name, explicitFileCount, implicitFileCount, workIte
mQueueLength, cacheEntryExceptions); |
| 9405 } else { |
| 9406 throw jsonDecoder.mismatch(jsonPath, "ContextData", json); |
| 9407 } |
| 9408 } |
| 9409 |
| 9410 Map<String, dynamic> toJson() { |
| 9411 Map<String, dynamic> result = {}; |
| 9412 result["name"] = name; |
| 9413 result["explicitFileCount"] = explicitFileCount; |
| 9414 result["implicitFileCount"] = implicitFileCount; |
| 9415 result["workItemQueueLength"] = workItemQueueLength; |
| 9416 result["cacheEntryExceptions"] = cacheEntryExceptions; |
| 9417 return result; |
| 9418 } |
| 9419 |
| 9420 @override |
| 9421 String toString() => JSON.encode(toJson()); |
| 9422 |
| 9423 @override |
| 9424 bool operator==(other) { |
| 9425 if (other is ContextData) { |
| 9426 return name == other.name && |
| 9427 explicitFileCount == other.explicitFileCount && |
| 9428 implicitFileCount == other.implicitFileCount && |
| 9429 workItemQueueLength == other.workItemQueueLength && |
| 9430 listEqual(cacheEntryExceptions, other.cacheEntryExceptions, (String a,
String b) => a == b); |
| 9431 } |
| 9432 return false; |
| 9433 } |
| 9434 |
| 9435 @override |
| 9436 int get hashCode { |
| 9437 int hash = 0; |
| 9438 hash = JenkinsSmiHash.combine(hash, name.hashCode); |
| 9439 hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode); |
| 9440 hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode); |
| 9441 hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode); |
| 9442 hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode); |
| 9443 return JenkinsSmiHash.finish(hash); |
| 9444 } |
| 9445 } |
| 9446 |
| 9447 /** |
9170 * Element | 9448 * Element |
9171 * | 9449 * |
9172 * { | 9450 * { |
9173 * "kind": ElementKind | 9451 * "kind": ElementKind |
9174 * "name": String | 9452 * "name": String |
9175 * "location": optional Location | 9453 * "location": optional Location |
9176 * "flags": int | 9454 * "flags": int |
9177 * "parameters": optional String | 9455 * "parameters": optional String |
9178 * "returnType": optional String | 9456 * "returnType": optional String |
9179 * "typeParameters": optional String | 9457 * "typeParameters": optional String |
(...skipping 7242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16422 return false; | 16700 return false; |
16423 } | 16701 } |
16424 | 16702 |
16425 @override | 16703 @override |
16426 int get hashCode { | 16704 int get hashCode { |
16427 int hash = 0; | 16705 int hash = 0; |
16428 hash = JenkinsSmiHash.combine(hash, newName.hashCode); | 16706 hash = JenkinsSmiHash.combine(hash, newName.hashCode); |
16429 return JenkinsSmiHash.finish(hash); | 16707 return JenkinsSmiHash.finish(hash); |
16430 } | 16708 } |
16431 } | 16709 } |
OLD | NEW |