blob: cb7d9469bd36d87b95d3ba941a03d65e94072b10 [file] [log] [blame]
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// This file has been automatically generated. Please do not edit it manually.
// To regenerate the file, use the script
// "pkg/analysis_server/tool/spec/generate_files".
import 'dart:convert' hide JsonDecoder;
import 'package:analyzer/src/generated/utilities_general.dart';
import 'package:analysis_server/protocol/protocol.dart';
import 'package:analysis_server/src/protocol/protocol_internal.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart';
/**
* analysis.analyzedFiles params
*
* {
* "directories": List<FilePath>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisAnalyzedFilesParams implements HasToJson {
List<String> _directories;
/**
* A list of the paths of the files that are being analyzed.
*/
List<String> get directories => _directories;
/**
* A list of the paths of the files that are being analyzed.
*/
void set directories(List<String> value) {
assert(value != null);
this._directories = value;
}
AnalysisAnalyzedFilesParams(List<String> directories) {
this.directories = directories;
}
factory AnalysisAnalyzedFilesParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
List<String> directories;
if (json.containsKey("directories")) {
directories = jsonDecoder.decodeList(jsonPath + ".directories",
json["directories"], jsonDecoder.decodeString);
} else {
throw jsonDecoder.mismatch(jsonPath, "directories");
}
return new AnalysisAnalyzedFilesParams(directories);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.analyzedFiles params", json);
}
}
factory AnalysisAnalyzedFilesParams.fromNotification(
Notification notification) {
return new AnalysisAnalyzedFilesParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["directories"] = directories;
return result;
}
Notification toNotification() {
return new Notification("analysis.analyzedFiles", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisAnalyzedFilesParams) {
return listEqual(
directories, other.directories, (String a, String b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, directories.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.closingLabels params
*
* {
* "file": FilePath
* "labels": List<ClosingLabel>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisClosingLabelsParams implements HasToJson {
String _file;
List<ClosingLabel> _labels;
/**
* The file the closing labels relate to.
*/
String get file => _file;
/**
* The file the closing labels relate to.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* Closing labels relevant to the file. Each item represents a useful label
* associated with some range with may be useful to display to the user
* within the editor at the end of the range to indicate what construct is
* closed at that location. Closing labels include constructor/method calls
* and List arguments that span multiple lines. Note that the ranges that are
* returned can overlap each other because they may be associated with
* constructs that can be nested.
*/
List<ClosingLabel> get labels => _labels;
/**
* Closing labels relevant to the file. Each item represents a useful label
* associated with some range with may be useful to display to the user
* within the editor at the end of the range to indicate what construct is
* closed at that location. Closing labels include constructor/method calls
* and List arguments that span multiple lines. Note that the ranges that are
* returned can overlap each other because they may be associated with
* constructs that can be nested.
*/
void set labels(List<ClosingLabel> value) {
assert(value != null);
this._labels = value;
}
AnalysisClosingLabelsParams(String file, List<ClosingLabel> labels) {
this.file = file;
this.labels = labels;
}
factory AnalysisClosingLabelsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
List<ClosingLabel> labels;
if (json.containsKey("labels")) {
labels = jsonDecoder.decodeList(
jsonPath + ".labels",
json["labels"],
(String jsonPath, Object json) =>
new ClosingLabel.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "labels");
}
return new AnalysisClosingLabelsParams(file, labels);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.closingLabels params", json);
}
}
factory AnalysisClosingLabelsParams.fromNotification(
Notification notification) {
return new AnalysisClosingLabelsParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["labels"] =
labels.map((ClosingLabel value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return new Notification("analysis.closingLabels", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisClosingLabelsParams) {
return file == other.file &&
listEqual(
labels, other.labels, (ClosingLabel a, ClosingLabel b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, labels.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* AnalysisErrorFixes
*
* {
* "error": AnalysisError
* "fixes": List<SourceChange>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisErrorFixes implements HasToJson {
AnalysisError _error;
List<SourceChange> _fixes;
/**
* The error with which the fixes are associated.
*/
AnalysisError get error => _error;
/**
* The error with which the fixes are associated.
*/
void set error(AnalysisError value) {
assert(value != null);
this._error = value;
}
/**
* The fixes associated with the error.
*/
List<SourceChange> get fixes => _fixes;
/**
* The fixes associated with the error.
*/
void set fixes(List<SourceChange> value) {
assert(value != null);
this._fixes = value;
}
AnalysisErrorFixes(AnalysisError error, {List<SourceChange> fixes}) {
this.error = error;
if (fixes == null) {
this.fixes = <SourceChange>[];
} else {
this.fixes = fixes;
}
}
factory AnalysisErrorFixes.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
AnalysisError error;
if (json.containsKey("error")) {
error = new AnalysisError.fromJson(
jsonDecoder, jsonPath + ".error", json["error"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "error");
}
List<SourceChange> fixes;
if (json.containsKey("fixes")) {
fixes = jsonDecoder.decodeList(
jsonPath + ".fixes",
json["fixes"],
(String jsonPath, Object json) =>
new SourceChange.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "fixes");
}
return new AnalysisErrorFixes(error, fixes: fixes);
} else {
throw jsonDecoder.mismatch(jsonPath, "AnalysisErrorFixes", json);
}
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["error"] = error.toJson();
result["fixes"] =
fixes.map((SourceChange value) => value.toJson()).toList();
return result;
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisErrorFixes) {
return error == other.error &&
listEqual(
fixes, other.fixes, (SourceChange a, SourceChange b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, error.hashCode);
hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.errors params
*
* {
* "file": FilePath
* "errors": List<AnalysisError>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisErrorsParams implements HasToJson {
String _file;
List<AnalysisError> _errors;
/**
* The file containing the errors.
*/
String get file => _file;
/**
* The file containing the errors.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The errors contained in the file.
*/
List<AnalysisError> get errors => _errors;
/**
* The errors contained in the file.
*/
void set errors(List<AnalysisError> value) {
assert(value != null);
this._errors = value;
}
AnalysisErrorsParams(String file, List<AnalysisError> errors) {
this.file = file;
this.errors = errors;
}
factory AnalysisErrorsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
List<AnalysisError> errors;
if (json.containsKey("errors")) {
errors = jsonDecoder.decodeList(
jsonPath + ".errors",
json["errors"],
(String jsonPath, Object json) =>
new AnalysisError.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "errors");
}
return new AnalysisErrorsParams(file, errors);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.errors params", json);
}
}
factory AnalysisErrorsParams.fromNotification(Notification notification) {
return new AnalysisErrorsParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["errors"] =
errors.map((AnalysisError value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return new Notification("analysis.errors", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisErrorsParams) {
return file == other.file &&
listEqual(errors, other.errors,
(AnalysisError a, AnalysisError b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, errors.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.flushResults params
*
* {
* "files": List<FilePath>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisFlushResultsParams implements HasToJson {
List<String> _files;
/**
* The files that are no longer being analyzed.
*/
List<String> get files => _files;
/**
* The files that are no longer being analyzed.
*/
void set files(List<String> value) {
assert(value != null);
this._files = value;
}
AnalysisFlushResultsParams(List<String> files) {
this.files = files;
}
factory AnalysisFlushResultsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
List<String> files;
if (json.containsKey("files")) {
files = jsonDecoder.decodeList(
jsonPath + ".files", json["files"], jsonDecoder.decodeString);
} else {
throw jsonDecoder.mismatch(jsonPath, "files");
}
return new AnalysisFlushResultsParams(files);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.flushResults params", json);
}
}
factory AnalysisFlushResultsParams.fromNotification(
Notification notification) {
return new AnalysisFlushResultsParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["files"] = files;
return result;
}
Notification toNotification() {
return new Notification("analysis.flushResults", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisFlushResultsParams) {
return listEqual(files, other.files, (String a, String b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, files.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.folding params
*
* {
* "file": FilePath
* "regions": List<FoldingRegion>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisFoldingParams implements HasToJson {
String _file;
List<FoldingRegion> _regions;
/**
* The file containing the folding regions.
*/
String get file => _file;
/**
* The file containing the folding regions.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The folding regions contained in the file.
*/
List<FoldingRegion> get regions => _regions;
/**
* The folding regions contained in the file.
*/
void set regions(List<FoldingRegion> value) {
assert(value != null);
this._regions = value;
}
AnalysisFoldingParams(String file, List<FoldingRegion> regions) {
this.file = file;
this.regions = regions;
}
factory AnalysisFoldingParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
List<FoldingRegion> regions;
if (json.containsKey("regions")) {
regions = jsonDecoder.decodeList(
jsonPath + ".regions",
json["regions"],
(String jsonPath, Object json) =>
new FoldingRegion.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "regions");
}
return new AnalysisFoldingParams(file, regions);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.folding params", json);
}
}
factory AnalysisFoldingParams.fromNotification(Notification notification) {
return new AnalysisFoldingParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["regions"] =
regions.map((FoldingRegion value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return new Notification("analysis.folding", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisFoldingParams) {
return file == other.file &&
listEqual(regions, other.regions,
(FoldingRegion a, FoldingRegion b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, regions.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getErrors params
*
* {
* "file": FilePath
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetErrorsParams implements RequestParams {
String _file;
/**
* The file for which errors are being requested.
*/
String get file => _file;
/**
* The file for which errors are being requested.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
AnalysisGetErrorsParams(String file) {
this.file = file;
}
factory AnalysisGetErrorsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
return new AnalysisGetErrorsParams(file);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors params", json);
}
}
factory AnalysisGetErrorsParams.fromRequest(Request request) {
return new AnalysisGetErrorsParams.fromJson(
new RequestDecoder(request), "params", request.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
return result;
}
@override
Request toRequest(String id) {
return new Request(id, "analysis.getErrors", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetErrorsParams) {
return file == other.file;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getErrors result
*
* {
* "errors": List<AnalysisError>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetErrorsResult implements ResponseResult {
List<AnalysisError> _errors;
/**
* The errors associated with the file.
*/
List<AnalysisError> get errors => _errors;
/**
* The errors associated with the file.
*/
void set errors(List<AnalysisError> value) {
assert(value != null);
this._errors = value;
}
AnalysisGetErrorsResult(List<AnalysisError> errors) {
this.errors = errors;
}
factory AnalysisGetErrorsResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
List<AnalysisError> errors;
if (json.containsKey("errors")) {
errors = jsonDecoder.decodeList(
jsonPath + ".errors",
json["errors"],
(String jsonPath, Object json) =>
new AnalysisError.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "errors");
}
return new AnalysisGetErrorsResult(errors);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.getErrors result", json);
}
}
factory AnalysisGetErrorsResult.fromResponse(Response response) {
return new AnalysisGetErrorsResult.fromJson(
new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
"result",
response.result);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["errors"] =
errors.map((AnalysisError value) => value.toJson()).toList();
return result;
}
@override
Response toResponse(String id) {
return new Response(id, result: toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetErrorsResult) {
return listEqual(
errors, other.errors, (AnalysisError a, AnalysisError b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, errors.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getHover params
*
* {
* "file": FilePath
* "offset": int
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetHoverParams implements RequestParams {
String _file;
int _offset;
/**
* The file in which hover information is being requested.
*/
String get file => _file;
/**
* The file in which hover information is being requested.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The offset for which hover information is being requested.
*/
int get offset => _offset;
/**
* The offset for which hover information is being requested.
*/
void set offset(int value) {
assert(value != null);
this._offset = value;
}
AnalysisGetHoverParams(String file, int offset) {
this.file = file;
this.offset = offset;
}
factory AnalysisGetHoverParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
int offset;
if (json.containsKey("offset")) {
offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "offset");
}
return new AnalysisGetHoverParams(file, offset);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.getHover params", json);
}
}
factory AnalysisGetHoverParams.fromRequest(Request request) {
return new AnalysisGetHoverParams.fromJson(
new RequestDecoder(request), "params", request.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["offset"] = offset;
return result;
}
@override
Request toRequest(String id) {
return new Request(id, "analysis.getHover", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetHoverParams) {
return file == other.file && offset == other.offset;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, offset.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getHover result
*
* {
* "hovers": List<HoverInformation>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetHoverResult implements ResponseResult {
List<HoverInformation> _hovers;
/**
* The hover information associated with the location. The list will be empty
* if no information could be determined for the location. The list can
* contain multiple items if the file is being analyzed in multiple contexts
* in conflicting ways (such as a part that is included in multiple
* libraries).
*/
List<HoverInformation> get hovers => _hovers;
/**
* The hover information associated with the location. The list will be empty
* if no information could be determined for the location. The list can
* contain multiple items if the file is being analyzed in multiple contexts
* in conflicting ways (such as a part that is included in multiple
* libraries).
*/
void set hovers(List<HoverInformation> value) {
assert(value != null);
this._hovers = value;
}
AnalysisGetHoverResult(List<HoverInformation> hovers) {
this.hovers = hovers;
}
factory AnalysisGetHoverResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
List<HoverInformation> hovers;
if (json.containsKey("hovers")) {
hovers = jsonDecoder.decodeList(
jsonPath + ".hovers",
json["hovers"],
(String jsonPath, Object json) =>
new HoverInformation.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "hovers");
}
return new AnalysisGetHoverResult(hovers);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.getHover result", json);
}
}
factory AnalysisGetHoverResult.fromResponse(Response response) {
return new AnalysisGetHoverResult.fromJson(
new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
"result",
response.result);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["hovers"] =
hovers.map((HoverInformation value) => value.toJson()).toList();
return result;
}
@override
Response toResponse(String id) {
return new Response(id, result: toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetHoverResult) {
return listEqual(hovers, other.hovers,
(HoverInformation a, HoverInformation b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, hovers.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getImportedElements params
*
* {
* "file": FilePath
* "offset": int
* "length": int
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetImportedElementsParams implements RequestParams {
String _file;
int _offset;
int _length;
/**
* The file in which import information is being requested.
*/
String get file => _file;
/**
* The file in which import information is being requested.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The offset of the region for which import information is being requested.
*/
int get offset => _offset;
/**
* The offset of the region for which import information is being requested.
*/
void set offset(int value) {
assert(value != null);
this._offset = value;
}
/**
* The length of the region for which import information is being requested.
*/
int get length => _length;
/**
* The length of the region for which import information is being requested.
*/
void set length(int value) {
assert(value != null);
this._length = value;
}
AnalysisGetImportedElementsParams(String file, int offset, int length) {
this.file = file;
this.offset = offset;
this.length = length;
}
factory AnalysisGetImportedElementsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
int offset;
if (json.containsKey("offset")) {
offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "offset");
}
int length;
if (json.containsKey("length")) {
length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "length");
}
return new AnalysisGetImportedElementsParams(file, offset, length);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getImportedElements params", json);
}
}
factory AnalysisGetImportedElementsParams.fromRequest(Request request) {
return new AnalysisGetImportedElementsParams.fromJson(
new RequestDecoder(request), "params", request.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["offset"] = offset;
result["length"] = length;
return result;
}
@override
Request toRequest(String id) {
return new Request(id, "analysis.getImportedElements", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetImportedElementsParams) {
return file == other.file &&
offset == other.offset &&
length == other.length;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, offset.hashCode);
hash = JenkinsSmiHash.combine(hash, length.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getImportedElements result
*
* {
* "elements": List<ImportedElements>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetImportedElementsResult implements ResponseResult {
List<ImportedElements> _elements;
/**
* The information about the elements that are referenced in the specified
* region of the specified file that come from imported libraries.
*/
List<ImportedElements> get elements => _elements;
/**
* The information about the elements that are referenced in the specified
* region of the specified file that come from imported libraries.
*/
void set elements(List<ImportedElements> value) {
assert(value != null);
this._elements = value;
}
AnalysisGetImportedElementsResult(List<ImportedElements> elements) {
this.elements = elements;
}
factory AnalysisGetImportedElementsResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
List<ImportedElements> elements;
if (json.containsKey("elements")) {
elements = jsonDecoder.decodeList(
jsonPath + ".elements",
json["elements"],
(String jsonPath, Object json) =>
new ImportedElements.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "elements");
}
return new AnalysisGetImportedElementsResult(elements);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getImportedElements result", json);
}
}
factory AnalysisGetImportedElementsResult.fromResponse(Response response) {
return new AnalysisGetImportedElementsResult.fromJson(
new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
"result",
response.result);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["elements"] =
elements.map((ImportedElements value) => value.toJson()).toList();
return result;
}
@override
Response toResponse(String id) {
return new Response(id, result: toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetImportedElementsResult) {
return listEqual(elements, other.elements,
(ImportedElements a, ImportedElements b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, elements.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getLibraryDependencies params
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetLibraryDependenciesParams implements RequestParams {
@override
Map<String, dynamic> toJson() => <String, dynamic>{};
@override
Request toRequest(String id) {
return new Request(id, "analysis.getLibraryDependencies", null);
}
@override
bool operator ==(other) {
if (other is AnalysisGetLibraryDependenciesParams) {
return true;
}
return false;
}
@override
int get hashCode {
return 246577680;
}
}
/**
* analysis.getLibraryDependencies result
*
* {
* "libraries": List<FilePath>
* "packageMap": Map<String, Map<String, List<FilePath>>>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetLibraryDependenciesResult implements ResponseResult {
List<String> _libraries;
Map<String, Map<String, List<String>>> _packageMap;
/**
* A list of the paths of library elements referenced by files in existing
* analysis roots.
*/
List<String> get libraries => _libraries;
/**
* A list of the paths of library elements referenced by files in existing
* analysis roots.
*/
void set libraries(List<String> value) {
assert(value != null);
this._libraries = value;
}
/**
* A mapping from context source roots to package maps which map package
* names to source directories for use in client-side package URI resolution.
*/
Map<String, Map<String, List<String>>> get packageMap => _packageMap;
/**
* A mapping from context source roots to package maps which map package
* names to source directories for use in client-side package URI resolution.
*/
void set packageMap(Map<String, Map<String, List<String>>> value) {
assert(value != null);
this._packageMap = value;
}
AnalysisGetLibraryDependenciesResult(List<String> libraries,
Map<String, Map<String, List<String>>> packageMap) {
this.libraries = libraries;
this.packageMap = packageMap;
}
factory AnalysisGetLibraryDependenciesResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
List<String> libraries;
if (json.containsKey("libraries")) {
libraries = jsonDecoder.decodeList(jsonPath + ".libraries",
json["libraries"], jsonDecoder.decodeString);
} else {
throw jsonDecoder.mismatch(jsonPath, "libraries");
}
Map<String, Map<String, List<String>>> packageMap;
if (json.containsKey("packageMap")) {
packageMap = jsonDecoder.decodeMap(
jsonPath + ".packageMap", json["packageMap"],
valueDecoder: (String jsonPath, Object json) =>
jsonDecoder.decodeMap(jsonPath, json,
valueDecoder: (String jsonPath, Object json) => jsonDecoder
.decodeList(jsonPath, json, jsonDecoder.decodeString)));
} else {
throw jsonDecoder.mismatch(jsonPath, "packageMap");
}
return new AnalysisGetLibraryDependenciesResult(libraries, packageMap);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getLibraryDependencies result", json);
}
}
factory AnalysisGetLibraryDependenciesResult.fromResponse(Response response) {
return new AnalysisGetLibraryDependenciesResult.fromJson(
new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
"result",
response.result);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["libraries"] = libraries;
result["packageMap"] = packageMap;
return result;
}
@override
Response toResponse(String id) {
return new Response(id, result: toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetLibraryDependenciesResult) {
return listEqual(
libraries, other.libraries, (String a, String b) => a == b) &&
mapEqual(
packageMap,
other.packageMap,
(Map<String, List<String>> a, Map<String, List<String>> b) =>
mapEqual(
a,
b,
(List<String> a, List<String> b) =>
listEqual(a, b, (String a, String b) => a == b)));
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, libraries.hashCode);
hash = JenkinsSmiHash.combine(hash, packageMap.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getNavigation params
*
* {
* "file": FilePath
* "offset": int
* "length": int
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetNavigationParams implements RequestParams {
String _file;
int _offset;
int _length;
/**
* The file in which navigation information is being requested.
*/
String get file => _file;
/**
* The file in which navigation information is being requested.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The offset of the region for which navigation information is being
* requested.
*/
int get offset => _offset;
/**
* The offset of the region for which navigation information is being
* requested.
*/
void set offset(int value) {
assert(value != null);
this._offset = value;
}
/**
* The length of the region for which navigation information is being
* requested.
*/
int get length => _length;
/**
* The length of the region for which navigation information is being
* requested.
*/
void set length(int value) {
assert(value != null);
this._length = value;
}
AnalysisGetNavigationParams(String file, int offset, int length) {
this.file = file;
this.offset = offset;
this.length = length;
}
factory AnalysisGetNavigationParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
int offset;
if (json.containsKey("offset")) {
offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "offset");
}
int length;
if (json.containsKey("length")) {
length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "length");
}
return new AnalysisGetNavigationParams(file, offset, length);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getNavigation params", json);
}
}
factory AnalysisGetNavigationParams.fromRequest(Request request) {
return new AnalysisGetNavigationParams.fromJson(
new RequestDecoder(request), "params", request.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["offset"] = offset;
result["length"] = length;
return result;
}
@override
Request toRequest(String id) {
return new Request(id, "analysis.getNavigation", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetNavigationParams) {
return file == other.file &&
offset == other.offset &&
length == other.length;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, offset.hashCode);
hash = JenkinsSmiHash.combine(hash, length.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getNavigation result
*
* {
* "files": List<FilePath>
* "targets": List<NavigationTarget>
* "regions": List<NavigationRegion>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetNavigationResult implements ResponseResult {
List<String> _files;
List<NavigationTarget> _targets;
List<NavigationRegion> _regions;
/**
* A list of the paths of files that are referenced by the navigation
* targets.
*/
List<String> get files => _files;
/**
* A list of the paths of files that are referenced by the navigation
* targets.
*/
void set files(List<String> value) {
assert(value != null);
this._files = value;
}
/**
* A list of the navigation targets that are referenced by the navigation
* regions.
*/
List<NavigationTarget> get targets => _targets;
/**
* A list of the navigation targets that are referenced by the navigation
* regions.
*/
void set targets(List<NavigationTarget> value) {
assert(value != null);
this._targets = value;
}
/**
* A list of the navigation regions within the requested region of the file.
*/
List<NavigationRegion> get regions => _regions;
/**
* A list of the navigation regions within the requested region of the file.
*/
void set regions(List<NavigationRegion> value) {
assert(value != null);
this._regions = value;
}
AnalysisGetNavigationResult(List<String> files,
List<NavigationTarget> targets, List<NavigationRegion> regions) {
this.files = files;
this.targets = targets;
this.regions = regions;
}
factory AnalysisGetNavigationResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
List<String> files;
if (json.containsKey("files")) {
files = jsonDecoder.decodeList(
jsonPath + ".files", json["files"], jsonDecoder.decodeString);
} else {
throw jsonDecoder.mismatch(jsonPath, "files");
}
List<NavigationTarget> targets;
if (json.containsKey("targets")) {
targets = jsonDecoder.decodeList(
jsonPath + ".targets",
json["targets"],
(String jsonPath, Object json) =>
new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "targets");
}
List<NavigationRegion> regions;
if (json.containsKey("regions")) {
regions = jsonDecoder.decodeList(
jsonPath + ".regions",
json["regions"],
(String jsonPath, Object json) =>
new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "regions");
}
return new AnalysisGetNavigationResult(files, targets, regions);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getNavigation result", json);
}
}
factory AnalysisGetNavigationResult.fromResponse(Response response) {
return new AnalysisGetNavigationResult.fromJson(
new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
"result",
response.result);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["files"] = files;
result["targets"] =
targets.map((NavigationTarget value) => value.toJson()).toList();
result["regions"] =
regions.map((NavigationRegion value) => value.toJson()).toList();
return result;
}
@override
Response toResponse(String id) {
return new Response(id, result: toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetNavigationResult) {
return listEqual(files, other.files, (String a, String b) => a == b) &&
listEqual(targets, other.targets,
(NavigationTarget a, NavigationTarget b) => a == b) &&
listEqual(regions, other.regions,
(NavigationRegion a, NavigationRegion b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, files.hashCode);
hash = JenkinsSmiHash.combine(hash, targets.hashCode);
hash = JenkinsSmiHash.combine(hash, regions.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getReachableSources params
*
* {
* "file": FilePath
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetReachableSourcesParams implements RequestParams {
String _file;
/**
* The file for which reachable source information is being requested.
*/
String get file => _file;
/**
* The file for which reachable source information is being requested.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
AnalysisGetReachableSourcesParams(String file) {
this.file = file;
}
factory AnalysisGetReachableSourcesParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
return new AnalysisGetReachableSourcesParams(file);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getReachableSources params", json);
}
}
factory AnalysisGetReachableSourcesParams.fromRequest(Request request) {
return new AnalysisGetReachableSourcesParams.fromJson(
new RequestDecoder(request), "params", request.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
return result;
}
@override
Request toRequest(String id) {
return new Request(id, "analysis.getReachableSources", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetReachableSourcesParams) {
return file == other.file;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getReachableSources result
*
* {
* "sources": Map<String, List<String>>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetReachableSourcesResult implements ResponseResult {
Map<String, List<String>> _sources;
/**
* A mapping from source URIs to directly reachable source URIs. For example,
* a file "foo.dart" that imports "bar.dart" would have the corresponding
* mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has
* further imports (or exports) there will be a mapping from the URI
* "file:///bar.dart" to them. To check if a specific URI is reachable from a
* given file, clients can check for its presence in the resulting key set.
*/
Map<String, List<String>> get sources => _sources;
/**
* A mapping from source URIs to directly reachable source URIs. For example,
* a file "foo.dart" that imports "bar.dart" would have the corresponding
* mapping { "file:///foo.dart" : ["file:///bar.dart"] }. If "bar.dart" has
* further imports (or exports) there will be a mapping from the URI
* "file:///bar.dart" to them. To check if a specific URI is reachable from a
* given file, clients can check for its presence in the resulting key set.
*/
void set sources(Map<String, List<String>> value) {
assert(value != null);
this._sources = value;
}
AnalysisGetReachableSourcesResult(Map<String, List<String>> sources) {
this.sources = sources;
}
factory AnalysisGetReachableSourcesResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
Map<String, List<String>> sources;
if (json.containsKey("sources")) {
sources = jsonDecoder.decodeMap(jsonPath + ".sources", json["sources"],
valueDecoder: (String jsonPath, Object json) => jsonDecoder
.decodeList(jsonPath, json, jsonDecoder.decodeString));
} else {
throw jsonDecoder.mismatch(jsonPath, "sources");
}
return new AnalysisGetReachableSourcesResult(sources);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getReachableSources result", json);
}
}
factory AnalysisGetReachableSourcesResult.fromResponse(Response response) {
return new AnalysisGetReachableSourcesResult.fromJson(
new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
"result",
response.result);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["sources"] = sources;
return result;
}
@override
Response toResponse(String id) {
return new Response(id, result: toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetReachableSourcesResult) {
return mapEqual(
sources,
other.sources,
(List<String> a, List<String> b) =>
listEqual(a, b, (String a, String b) => a == b));
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, sources.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getSignature params
*
* {
* "file": FilePath
* "offset": int
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetSignatureParams implements RequestParams {
String _file;
int _offset;
/**
* The file in which signature information is being requested.
*/
String get file => _file;
/**
* The file in which signature information is being requested.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The location for which signature information is being requested.
*/
int get offset => _offset;
/**
* The location for which signature information is being requested.
*/
void set offset(int value) {
assert(value != null);
this._offset = value;
}
AnalysisGetSignatureParams(String file, int offset) {
this.file = file;
this.offset = offset;
}
factory AnalysisGetSignatureParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
int offset;
if (json.containsKey("offset")) {
offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "offset");
}
return new AnalysisGetSignatureParams(file, offset);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getSignature params", json);
}
}
factory AnalysisGetSignatureParams.fromRequest(Request request) {
return new AnalysisGetSignatureParams.fromJson(
new RequestDecoder(request), "params", request.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["offset"] = offset;
return result;
}
@override
Request toRequest(String id) {
return new Request(id, "analysis.getSignature", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetSignatureParams) {
return file == other.file && offset == other.offset;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, offset.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.getSignature result
*
* {
* "name": String
* "parameters": List<ParameterInfo>
* "dartdoc": optional String
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisGetSignatureResult implements ResponseResult {
String _name;
List<ParameterInfo> _parameters;
String _dartdoc;
/**
* The name of the function being invoked at the given offset.
*/
String get name => _name;
/**
* The name of the function being invoked at the given offset.
*/
void set name(String value) {
assert(value != null);
this._name = value;
}
/**
* A list of information about each of the parameters of the function being
* invoked.
*/
List<ParameterInfo> get parameters => _parameters;
/**
* A list of information about each of the parameters of the function being
* invoked.
*/
void set parameters(List<ParameterInfo> value) {
assert(value != null);
this._parameters = value;
}
/**
* The dartdoc associated with the function being invoked. Other than the
* removal of the comment delimiters, including leading asterisks in the case
* of a block comment, the dartdoc is unprocessed markdown. This data is
* omitted if there is no referenced element, or if the element has no
* dartdoc.
*/
String get dartdoc => _dartdoc;
/**
* The dartdoc associated with the function being invoked. Other than the
* removal of the comment delimiters, including leading asterisks in the case
* of a block comment, the dartdoc is unprocessed markdown. This data is
* omitted if there is no referenced element, or if the element has no
* dartdoc.
*/
void set dartdoc(String value) {
this._dartdoc = value;
}
AnalysisGetSignatureResult(String name, List<ParameterInfo> parameters,
{String dartdoc}) {
this.name = name;
this.parameters = parameters;
this.dartdoc = dartdoc;
}
factory AnalysisGetSignatureResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String name;
if (json.containsKey("name")) {
name = jsonDecoder.decodeString(jsonPath + ".name", json["name"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "name");
}
List<ParameterInfo> parameters;
if (json.containsKey("parameters")) {
parameters = jsonDecoder.decodeList(
jsonPath + ".parameters",
json["parameters"],
(String jsonPath, Object json) =>
new ParameterInfo.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "parameters");
}
String dartdoc;
if (json.containsKey("dartdoc")) {
dartdoc =
jsonDecoder.decodeString(jsonPath + ".dartdoc", json["dartdoc"]);
}
return new AnalysisGetSignatureResult(name, parameters, dartdoc: dartdoc);
} else {
throw jsonDecoder.mismatch(
jsonPath, "analysis.getSignature result", json);
}
}
factory AnalysisGetSignatureResult.fromResponse(Response response) {
return new AnalysisGetSignatureResult.fromJson(
new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
"result",
response.result);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["name"] = name;
result["parameters"] =
parameters.map((ParameterInfo value) => value.toJson()).toList();
if (dartdoc != null) {
result["dartdoc"] = dartdoc;
}
return result;
}
@override
Response toResponse(String id) {
return new Response(id, result: toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisGetSignatureResult) {
return name == other.name &&
listEqual(parameters, other.parameters,
(ParameterInfo a, ParameterInfo b) => a == b) &&
dartdoc == other.dartdoc;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, name.hashCode);
hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
hash = JenkinsSmiHash.combine(hash, dartdoc.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.highlights params
*
* {
* "file": FilePath
* "regions": List<HighlightRegion>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisHighlightsParams implements HasToJson {
String _file;
List<HighlightRegion> _regions;
/**
* The file containing the highlight regions.
*/
String get file => _file;
/**
* The file containing the highlight regions.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The highlight regions contained in the file. Each highlight region
* represents a particular syntactic or semantic meaning associated with some
* range. Note that the highlight regions that are returned can overlap other
* highlight regions if there is more than one meaning associated with a
* particular region.
*/
List<HighlightRegion> get regions => _regions;
/**
* The highlight regions contained in the file. Each highlight region
* represents a particular syntactic or semantic meaning associated with some
* range. Note that the highlight regions that are returned can overlap other
* highlight regions if there is more than one meaning associated with a
* particular region.
*/
void set regions(List<HighlightRegion> value) {
assert(value != null);
this._regions = value;
}
AnalysisHighlightsParams(String file, List<HighlightRegion> regions) {
this.file = file;
this.regions = regions;
}
factory AnalysisHighlightsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
List<HighlightRegion> regions;
if (json.containsKey("regions")) {
regions = jsonDecoder.decodeList(
jsonPath + ".regions",
json["regions"],
(String jsonPath, Object json) =>
new HighlightRegion.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "regions");
}
return new AnalysisHighlightsParams(file, regions);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.highlights params", json);
}
}
factory AnalysisHighlightsParams.fromNotification(Notification notification) {
return new AnalysisHighlightsParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["regions"] =
regions.map((HighlightRegion value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return new Notification("analysis.highlights", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisHighlightsParams) {
return file == other.file &&
listEqual(regions, other.regions,
(HighlightRegion a, HighlightRegion b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, regions.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.implemented params
*
* {
* "file": FilePath
* "classes": List<ImplementedClass>
* "members": List<ImplementedMember>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisImplementedParams implements HasToJson {
String _file;
List<ImplementedClass> _classes;
List<ImplementedMember> _members;
/**
* The file with which the implementations are associated.
*/
String get file => _file;
/**
* The file with which the implementations are associated.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The classes defined in the file that are implemented or extended.
*/
List<ImplementedClass> get classes => _classes;
/**
* The classes defined in the file that are implemented or extended.
*/
void set classes(List<ImplementedClass> value) {
assert(value != null);
this._classes = value;
}
/**
* The member defined in the file that are implemented or overridden.
*/
List<ImplementedMember> get members => _members;
/**
* The member defined in the file that are implemented or overridden.
*/
void set members(List<ImplementedMember> value) {
assert(value != null);
this._members = value;
}
AnalysisImplementedParams(String file, List<ImplementedClass> classes,
List<ImplementedMember> members) {
this.file = file;
this.classes = classes;
this.members = members;
}
factory AnalysisImplementedParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
List<ImplementedClass> classes;
if (json.containsKey("classes")) {
classes = jsonDecoder.decodeList(
jsonPath + ".classes",
json["classes"],
(String jsonPath, Object json) =>
new ImplementedClass.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "classes");
}
List<ImplementedMember> members;
if (json.containsKey("members")) {
members = jsonDecoder.decodeList(
jsonPath + ".members",
json["members"],
(String jsonPath, Object json) =>
new ImplementedMember.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "members");
}
return new AnalysisImplementedParams(file, classes, members);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.implemented params", json);
}
}
factory AnalysisImplementedParams.fromNotification(
Notification notification) {
return new AnalysisImplementedParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["classes"] =
classes.map((ImplementedClass value) => value.toJson()).toList();
result["members"] =
members.map((ImplementedMember value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return new Notification("analysis.implemented", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisImplementedParams) {
return file == other.file &&
listEqual(classes, other.classes,
(ImplementedClass a, ImplementedClass b) => a == b) &&
listEqual(members, other.members,
(ImplementedMember a, ImplementedMember b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, classes.hashCode);
hash = JenkinsSmiHash.combine(hash, members.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.invalidate params
*
* {
* "file": FilePath
* "offset": int
* "length": int
* "delta": int
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisInvalidateParams implements HasToJson {
String _file;
int _offset;
int _length;
int _delta;
/**
* The file whose information has been invalidated.
*/
String get file => _file;
/**
* The file whose information has been invalidated.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The offset of the invalidated region.
*/
int get offset => _offset;
/**
* The offset of the invalidated region.
*/
void set offset(int value) {
assert(value != null);
this._offset = value;
}
/**
* The length of the invalidated region.
*/
int get length => _length;
/**
* The length of the invalidated region.
*/
void set length(int value) {
assert(value != null);
this._length = value;
}
/**
* The delta to be applied to the offsets in information that follows the
* invalidated region in order to update it so that it doesn't need to be
* re-requested.
*/
int get delta => _delta;
/**
* The delta to be applied to the offsets in information that follows the
* invalidated region in order to update it so that it doesn't need to be
* re-requested.
*/
void set delta(int value) {
assert(value != null);
this._delta = value;
}
AnalysisInvalidateParams(String file, int offset, int length, int delta) {
this.file = file;
this.offset = offset;
this.length = length;
this.delta = delta;
}
factory AnalysisInvalidateParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
int offset;
if (json.containsKey("offset")) {
offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "offset");
}
int length;
if (json.containsKey("length")) {
length = jsonDecoder.decodeInt(jsonPath + ".length", json["length"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "length");
}
int delta;
if (json.containsKey("delta")) {
delta = jsonDecoder.decodeInt(jsonPath + ".delta", json["delta"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "delta");
}
return new AnalysisInvalidateParams(file, offset, length, delta);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.invalidate params", json);
}
}
factory AnalysisInvalidateParams.fromNotification(Notification notification) {
return new AnalysisInvalidateParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["offset"] = offset;
result["length"] = length;
result["delta"] = delta;
return result;
}
Notification toNotification() {
return new Notification("analysis.invalidate", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisInvalidateParams) {
return file == other.file &&
offset == other.offset &&
length == other.length &&
delta == other.delta;
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, offset.hashCode);
hash = JenkinsSmiHash.combine(hash, length.hashCode);
hash = JenkinsSmiHash.combine(hash, delta.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.navigation params
*
* {
* "file": FilePath
* "regions": List<NavigationRegion>
* "targets": List<NavigationTarget>
* "files": List<FilePath>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisNavigationParams implements HasToJson {
String _file;
List<NavigationRegion> _regions;
List<NavigationTarget> _targets;
List<String> _files;
/**
* The file containing the navigation regions.
*/
String get file => _file;
/**
* The file containing the navigation regions.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The navigation regions contained in the file. The regions are sorted by
* their offsets. Each navigation region represents a list of targets
* associated with some range. The lists will usually contain a single
* target, but can contain more in the case of a part that is included in
* multiple libraries or in Dart code that is compiled against multiple
* versions of a package. Note that the navigation regions that are returned
* do not overlap other navigation regions.
*/
List<NavigationRegion> get regions => _regions;
/**
* The navigation regions contained in the file. The regions are sorted by
* their offsets. Each navigation region represents a list of targets
* associated with some range. The lists will usually contain a single
* target, but can contain more in the case of a part that is included in
* multiple libraries or in Dart code that is compiled against multiple
* versions of a package. Note that the navigation regions that are returned
* do not overlap other navigation regions.
*/
void set regions(List<NavigationRegion> value) {
assert(value != null);
this._regions = value;
}
/**
* The navigation targets referenced in the file. They are referenced by
* NavigationRegions by their index in this array.
*/
List<NavigationTarget> get targets => _targets;
/**
* The navigation targets referenced in the file. They are referenced by
* NavigationRegions by their index in this array.
*/
void set targets(List<NavigationTarget> value) {
assert(value != null);
this._targets = value;
}
/**
* The files containing navigation targets referenced in the file. They are
* referenced by NavigationTargets by their index in this array.
*/
List<String> get files => _files;
/**
* The files containing navigation targets referenced in the file. They are
* referenced by NavigationTargets by their index in this array.
*/
void set files(List<String> value) {
assert(value != null);
this._files = value;
}
AnalysisNavigationParams(String file, List<NavigationRegion> regions,
List<NavigationTarget> targets, List<String> files) {
this.file = file;
this.regions = regions;
this.targets = targets;
this.files = files;
}
factory AnalysisNavigationParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
List<NavigationRegion> regions;
if (json.containsKey("regions")) {
regions = jsonDecoder.decodeList(
jsonPath + ".regions",
json["regions"],
(String jsonPath, Object json) =>
new NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "regions");
}
List<NavigationTarget> targets;
if (json.containsKey("targets")) {
targets = jsonDecoder.decodeList(
jsonPath + ".targets",
json["targets"],
(String jsonPath, Object json) =>
new NavigationTarget.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "targets");
}
List<String> files;
if (json.containsKey("files")) {
files = jsonDecoder.decodeList(
jsonPath + ".files", json["files"], jsonDecoder.decodeString);
} else {
throw jsonDecoder.mismatch(jsonPath, "files");
}
return new AnalysisNavigationParams(file, regions, targets, files);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.navigation params", json);
}
}
factory AnalysisNavigationParams.fromNotification(Notification notification) {
return new AnalysisNavigationParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["regions"] =
regions.map((NavigationRegion value) => value.toJson()).toList();
result["targets"] =
targets.map((NavigationTarget value) => value.toJson()).toList();
result["files"] = files;
return result;
}
Notification toNotification() {
return new Notification("analysis.navigation", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisNavigationParams) {
return file == other.file &&
listEqual(regions, other.regions,
(NavigationRegion a, NavigationRegion b) => a == b) &&
listEqual(targets, other.targets,
(NavigationTarget a, NavigationTarget b) => a == b) &&
listEqual(files, other.files, (String a, String b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, regions.hashCode);
hash = JenkinsSmiHash.combine(hash, targets.hashCode);
hash = JenkinsSmiHash.combine(hash, files.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* analysis.occurrences params
*
* {
* "file": FilePath
* "occurrences": List<Occurrences>
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisOccurrencesParams implements HasToJson {
String _file;
List<Occurrences> _occurrences;
/**
* The file in which the references occur.
*/
String get file => _file;
/**
* The file in which the references occur.
*/
void set file(String value) {
assert(value != null);
this._file = value;
}
/**
* The occurrences of references to elements within the file.
*/
List<Occurrences> get occurrences => _occurrences;
/**
* The occurrences of references to elements within the file.
*/
void set occurrences(List<Occurrences> value) {
assert(value != null);
this._occurrences = value;
}
AnalysisOccurrencesParams(String file, List<Occurrences> occurrences) {
this.file = file;
this.occurrences = occurrences;
}
factory AnalysisOccurrencesParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
String file;
if (json.containsKey("file")) {
file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
} else {
throw jsonDecoder.mismatch(jsonPath, "file");
}
List<Occurrences> occurrences;
if (json.containsKey("occurrences")) {
occurrences = jsonDecoder.decodeList(
jsonPath + ".occurrences",
json["occurrences"],
(String jsonPath, Object json) =>
new Occurrences.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, "occurrences");
}
return new AnalysisOccurrencesParams(file, occurrences);
} else {
throw jsonDecoder.mismatch(jsonPath, "analysis.occurrences params", json);
}
}
factory AnalysisOccurrencesParams.fromNotification(
Notification notification) {
return new AnalysisOccurrencesParams.fromJson(
new ResponseDecoder(null), "params", notification.params);
}
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> result = {};
result["file"] = file;
result["occurrences"] =
occurrences.map((Occurrences value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return new Notification("analysis.occurrences", toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisOccurrencesParams) {
return file == other.file &&
listEqual(occurrences, other.occurrences,
(Occurrences a, Occurrences b) => a == b);
}
return false;
}
@override
int get hashCode {
int hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, occurrences.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/**
* AnalysisOptions
*
* {
* "enableAsync": optional bool
* "enableDeferredLoading": optional bool
* "enableEnums": optional bool
* "enableNullAwareOperators": optional bool
* "enableSuperMixins": optional bool
* "generateDart2jsHints": optional bool
* "generateHints": optional bool
* "generateLints": optional bool
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class AnalysisOptions implements HasToJson {
bool _enableAsync;
bool _enableDeferredLoading;
bool _enableEnums;
bool _enableNullAwareOperators;
bool _enableSuperMixins;
bool _generateDart2jsHints;
bool _generateHints;
bool _generateLints;
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed async feature.
*/
bool get enableAsync => _enableAsync;
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed async feature.
*/
void set enableAsync(bool value) {
this._enableAsync = value;
}
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed deferred
* loading feature.
*/
bool get enableDeferredLoading => _enableDeferredLoading;
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed deferred
* loading feature.
*/
void set enableDeferredLoading(bool value) {
this._enableDeferredLoading = value;
}
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed enum feature.
*/
bool get enableEnums => _enableEnums;
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed enum feature.
*/
void set enableEnums(bool value) {
this._enableEnums = value;
}
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed "null aware
* operators" feature.
*/
bool get enableNullAwareOperators => _enableNullAwareOperators;
/**
* Deprecated: this feature is always enabled.
*
* True if the client wants to enable support for the proposed "null aware
* operators" feature.
*/
void set enableNullAwareOperators(bool value) {
this._enableNullAwareOperators = value;
}
/**
* True if the client wants to enable support for the proposed "less
* restricted mixins" proposal (DEP 34).
*/
bool get enableSuperMixins => _enableSuperMixins;
/**
* True if the client wants to enable support for the proposed "less
* restricted mixins" proposal (DEP 34).
*/
void set enableSuperMixins(bool value) {
this._enableSuperMixins = value;
}
/**
* True if hints that are specific to dart2js should be generated. This
* option is ignored if generateHints is false.
*/
bool get generateDart2jsHints => _generateDart2jsHints;
/**
* True if hints that are specific to dart2js should be generated. This
* option is ignored if generateHints is false.
*/
void set generateDart2jsHints(bool value) {
this._generateDart2jsHints = value;
}
/**
* True if hints should be generated as part of generating errors and
* warnings.
*/
bool get generateHints => _generateHints;
/**
* True if hints should be generated as part of generating errors and
* warnings.
*/
void set generateHints(bool value) {
this._generateHints = value;
}
/**
* True if lints should be generated as part of generating errors and
* warnings.
*/
bool get generateLints => _generateLints;
/**
* True if lints should be generated as part of generating errors and
* warnings.
*/
void set generateLints(bool value) {
this._generateLints = value;
}
AnalysisOptions(
{bool enableAsync,
bool enableDeferredLoading,
bool enableEnums,
bool enableNullAwareOperators,
bool enableSuperMixins,
bool generateDart2jsHints,
bool generateHints,
bool generateLints}) {
this.enableAsync = enableAsync;
this.enableDeferredLoading = enableDeferredLoading;
this.enableEnums = enableEnums;
this.enableNullAwareOperators = enableNullAwareOperators;
this.enableSuperMixins = enableSuperMixins;
this.generateDart2jsHints = generateDart2jsHints;
this.generateHints = generateHints;
this.generateLints = generateLints;
}
factory AnalysisOptions.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
if (json == null) {
json = {};
}
if (json is Map) {
bool enableAsync;
if (json.containsKey("enableAsync")) {
enableAsync = jsonDecoder.decodeBool(
jsonPath + ".enableAsync", json["enableAsync"]);
}
bool enableDeferredLoading;
if (json.containsKey("enableDeferredLoading")) {
enableDeferredLoading = jsonDecoder.decodeBool(
jsonPath + ".enableDeferredLoading", json["enableDeferredLoading"]);
}
bool enableEnums;
if (json.containsKey("enableEnums")) {
enableEnums = jsonDecoder.decodeBool(
jsonPath + ".enableEnums", json["enableEnums"]);
}
bool enableNullAwareOperators;
if (json.containsKey("enableNullAwareOperators")) {
enableNullAwareOperators = jsonDecoder.decodeBool(
jsonPath + ".enableNullAwareOperators",
json["enableNullAwareOperators"]);
}
bool enableSuperMixins;
if (json.containsKey("enableSuperMixins")) {
enableSuperMixins = jsonDecoder.decodeBool(
jsonPath + ".enableSuperMixins", json[