blob: 3cf16bf9a691476e78316eb09e0e4f91c03a9321 [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.
set directories(List<String> value) {
assert(value != null);
_directories = value;
}
AnalysisAnalyzedFilesParams(List<String> directories) {
this.directories = directories;
}
factory AnalysisAnalyzedFilesParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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 AnalysisAnalyzedFilesParams(directories);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.analyzedFiles params', json);
}
}
factory AnalysisAnalyzedFilesParams.fromNotification(
Notification notification) {
return AnalysisAnalyzedFilesParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['directories'] = directories;
return result;
}
Notification toNotification() {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_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.
set labels(List<ClosingLabel> value) {
assert(value != null);
_labels = value;
}
AnalysisClosingLabelsParams(String file, List<ClosingLabel> labels) {
this.file = file;
this.labels = labels;
}
factory AnalysisClosingLabelsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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) =>
ClosingLabel.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'labels');
}
return AnalysisClosingLabelsParams(file, labels);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.closingLabels params', json);
}
}
factory AnalysisClosingLabelsParams.fromNotification(
Notification notification) {
return AnalysisClosingLabelsParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['labels'] =
labels.map((ClosingLabel value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return 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 {
var 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.
set error(AnalysisError value) {
assert(value != null);
_error = value;
}
/// The fixes associated with the error.
List<SourceChange> get fixes => _fixes;
/// The fixes associated with the error.
set fixes(List<SourceChange> value) {
assert(value != null);
_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) {
json ??= {};
if (json is Map) {
AnalysisError error;
if (json.containsKey('error')) {
error = 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) =>
SourceChange.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'fixes');
}
return AnalysisErrorFixes(error, fixes: fixes);
} else {
throw jsonDecoder.mismatch(jsonPath, 'AnalysisErrorFixes', json);
}
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
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 {
var 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.
set file(String value) {
assert(value != null);
_file = value;
}
/// The errors contained in the file.
List<AnalysisError> get errors => _errors;
/// The errors contained in the file.
set errors(List<AnalysisError> value) {
assert(value != null);
_errors = value;
}
AnalysisErrorsParams(String file, List<AnalysisError> errors) {
this.file = file;
this.errors = errors;
}
factory AnalysisErrorsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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) =>
AnalysisError.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'errors');
}
return AnalysisErrorsParams(file, errors);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.errors params', json);
}
}
factory AnalysisErrorsParams.fromNotification(Notification notification) {
return AnalysisErrorsParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['errors'] =
errors.map((AnalysisError value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return 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 {
var 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.
set files(List<String> value) {
assert(value != null);
_files = value;
}
AnalysisFlushResultsParams(List<String> files) {
this.files = files;
}
factory AnalysisFlushResultsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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 AnalysisFlushResultsParams(files);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.flushResults params', json);
}
}
factory AnalysisFlushResultsParams.fromNotification(
Notification notification) {
return AnalysisFlushResultsParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['files'] = files;
return result;
}
Notification toNotification() {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_file = value;
}
/// The folding regions contained in the file.
List<FoldingRegion> get regions => _regions;
/// The folding regions contained in the file.
set regions(List<FoldingRegion> value) {
assert(value != null);
_regions = value;
}
AnalysisFoldingParams(String file, List<FoldingRegion> regions) {
this.file = file;
this.regions = regions;
}
factory AnalysisFoldingParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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) =>
FoldingRegion.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'regions');
}
return AnalysisFoldingParams(file, regions);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.folding params', json);
}
}
factory AnalysisFoldingParams.fromNotification(Notification notification) {
return AnalysisFoldingParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['regions'] =
regions.map((FoldingRegion value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_file = value;
}
AnalysisGetErrorsParams(String file) {
this.file = file;
}
factory AnalysisGetErrorsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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 AnalysisGetErrorsParams(file);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.getErrors params', json);
}
}
factory AnalysisGetErrorsParams.fromRequest(Request request) {
return AnalysisGetErrorsParams.fromJson(
RequestDecoder(request), 'params', request.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
return result;
}
@override
Request toRequest(String id) {
return 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 {
var 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.
set errors(List<AnalysisError> value) {
assert(value != null);
_errors = value;
}
AnalysisGetErrorsResult(List<AnalysisError> errors) {
this.errors = errors;
}
factory AnalysisGetErrorsResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
json ??= {};
if (json is Map) {
List<AnalysisError> errors;
if (json.containsKey('errors')) {
errors = jsonDecoder.decodeList(
jsonPath + '.errors',
json['errors'],
(String jsonPath, Object json) =>
AnalysisError.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'errors');
}
return AnalysisGetErrorsResult(errors);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.getErrors result', json);
}
}
factory AnalysisGetErrorsResult.fromResponse(Response response) {
return AnalysisGetErrorsResult.fromJson(
ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
'result',
response.result);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['errors'] =
errors.map((AnalysisError value) => value.toJson()).toList();
return result;
}
@override
Response toResponse(String id) {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_file = value;
}
/// The offset for which hover information is being requested.
int get offset => _offset;
/// The offset for which hover information is being requested.
set offset(int value) {
assert(value != null);
_offset = value;
}
AnalysisGetHoverParams(String file, int offset) {
this.file = file;
this.offset = offset;
}
factory AnalysisGetHoverParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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 AnalysisGetHoverParams(file, offset);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.getHover params', json);
}
}
factory AnalysisGetHoverParams.fromRequest(Request request) {
return AnalysisGetHoverParams.fromJson(
RequestDecoder(request), 'params', request.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['offset'] = offset;
return result;
}
@override
Request toRequest(String id) {
return 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 {
var 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).
set hovers(List<HoverInformation> value) {
assert(value != null);
_hovers = value;
}
AnalysisGetHoverResult(List<HoverInformation> hovers) {
this.hovers = hovers;
}
factory AnalysisGetHoverResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
json ??= {};
if (json is Map) {
List<HoverInformation> hovers;
if (json.containsKey('hovers')) {
hovers = jsonDecoder.decodeList(
jsonPath + '.hovers',
json['hovers'],
(String jsonPath, Object json) =>
HoverInformation.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'hovers');
}
return AnalysisGetHoverResult(hovers);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.getHover result', json);
}
}
factory AnalysisGetHoverResult.fromResponse(Response response) {
return AnalysisGetHoverResult.fromJson(
ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
'result',
response.result);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['hovers'] =
hovers.map((HoverInformation value) => value.toJson()).toList();
return result;
}
@override
Response toResponse(String id) {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_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.
set offset(int value) {
assert(value != null);
_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.
set length(int value) {
assert(value != null);
_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) {
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 AnalysisGetImportedElementsParams(file, offset, length);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getImportedElements params', json);
}
}
factory AnalysisGetImportedElementsParams.fromRequest(Request request) {
return AnalysisGetImportedElementsParams.fromJson(
RequestDecoder(request), 'params', request.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['offset'] = offset;
result['length'] = length;
return result;
}
@override
Request toRequest(String id) {
return 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 {
var 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.
set elements(List<ImportedElements> value) {
assert(value != null);
_elements = value;
}
AnalysisGetImportedElementsResult(List<ImportedElements> elements) {
this.elements = elements;
}
factory AnalysisGetImportedElementsResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
json ??= {};
if (json is Map) {
List<ImportedElements> elements;
if (json.containsKey('elements')) {
elements = jsonDecoder.decodeList(
jsonPath + '.elements',
json['elements'],
(String jsonPath, Object json) =>
ImportedElements.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'elements');
}
return AnalysisGetImportedElementsResult(elements);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getImportedElements result', json);
}
}
factory AnalysisGetImportedElementsResult.fromResponse(Response response) {
return AnalysisGetImportedElementsResult.fromJson(
ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
'result',
response.result);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['elements'] =
elements.map((ImportedElements value) => value.toJson()).toList();
return result;
}
@override
Response toResponse(String id) {
return 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 {
var 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 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.
set libraries(List<String> value) {
assert(value != null);
_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.
set packageMap(Map<String, Map<String, List<String>>> value) {
assert(value != null);
_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) {
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 AnalysisGetLibraryDependenciesResult(libraries, packageMap);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getLibraryDependencies result', json);
}
}
factory AnalysisGetLibraryDependenciesResult.fromResponse(Response response) {
return AnalysisGetLibraryDependenciesResult.fromJson(
ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
'result',
response.result);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['libraries'] = libraries;
result['packageMap'] = packageMap;
return result;
}
@override
Response toResponse(String id) {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_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.
set offset(int value) {
assert(value != null);
_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.
set length(int value) {
assert(value != null);
_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) {
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 AnalysisGetNavigationParams(file, offset, length);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getNavigation params', json);
}
}
factory AnalysisGetNavigationParams.fromRequest(Request request) {
return AnalysisGetNavigationParams.fromJson(
RequestDecoder(request), 'params', request.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['offset'] = offset;
result['length'] = length;
return result;
}
@override
Request toRequest(String id) {
return 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 {
var 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.
set files(List<String> value) {
assert(value != null);
_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.
set targets(List<NavigationTarget> value) {
assert(value != null);
_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.
set regions(List<NavigationRegion> value) {
assert(value != null);
_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) {
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) =>
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) =>
NavigationRegion.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'regions');
}
return AnalysisGetNavigationResult(files, targets, regions);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getNavigation result', json);
}
}
factory AnalysisGetNavigationResult.fromResponse(Response response) {
return AnalysisGetNavigationResult.fromJson(
ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
'result',
response.result);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
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 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 {
var 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.
set file(String value) {
assert(value != null);
_file = value;
}
AnalysisGetReachableSourcesParams(String file) {
this.file = file;
}
factory AnalysisGetReachableSourcesParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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 AnalysisGetReachableSourcesParams(file);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getReachableSources params', json);
}
}
factory AnalysisGetReachableSourcesParams.fromRequest(Request request) {
return AnalysisGetReachableSourcesParams.fromJson(
RequestDecoder(request), 'params', request.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
return result;
}
@override
Request toRequest(String id) {
return 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 {
var 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.
set sources(Map<String, List<String>> value) {
assert(value != null);
_sources = value;
}
AnalysisGetReachableSourcesResult(Map<String, List<String>> sources) {
this.sources = sources;
}
factory AnalysisGetReachableSourcesResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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 AnalysisGetReachableSourcesResult(sources);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getReachableSources result', json);
}
}
factory AnalysisGetReachableSourcesResult.fromResponse(Response response) {
return AnalysisGetReachableSourcesResult.fromJson(
ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
'result',
response.result);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['sources'] = sources;
return result;
}
@override
Response toResponse(String id) {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_file = value;
}
/// The location for which signature information is being requested.
int get offset => _offset;
/// The location for which signature information is being requested.
set offset(int value) {
assert(value != null);
_offset = value;
}
AnalysisGetSignatureParams(String file, int offset) {
this.file = file;
this.offset = offset;
}
factory AnalysisGetSignatureParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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 AnalysisGetSignatureParams(file, offset);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getSignature params', json);
}
}
factory AnalysisGetSignatureParams.fromRequest(Request request) {
return AnalysisGetSignatureParams.fromJson(
RequestDecoder(request), 'params', request.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['offset'] = offset;
return result;
}
@override
Request toRequest(String id) {
return 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 {
var 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.
set name(String value) {
assert(value != null);
_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.
set parameters(List<ParameterInfo> value) {
assert(value != null);
_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.
set dartdoc(String value) {
_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) {
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) =>
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 AnalysisGetSignatureResult(name, parameters, dartdoc: dartdoc);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.getSignature result', json);
}
}
factory AnalysisGetSignatureResult.fromResponse(Response response) {
return AnalysisGetSignatureResult.fromJson(
ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
'result',
response.result);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
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 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 {
var 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.
set file(String value) {
assert(value != null);
_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.
set regions(List<HighlightRegion> value) {
assert(value != null);
_regions = value;
}
AnalysisHighlightsParams(String file, List<HighlightRegion> regions) {
this.file = file;
this.regions = regions;
}
factory AnalysisHighlightsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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) =>
HighlightRegion.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'regions');
}
return AnalysisHighlightsParams(file, regions);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.highlights params', json);
}
}
factory AnalysisHighlightsParams.fromNotification(Notification notification) {
return AnalysisHighlightsParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['regions'] =
regions.map((HighlightRegion value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_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.
set classes(List<ImplementedClass> value) {
assert(value != null);
_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.
set members(List<ImplementedMember> value) {
assert(value != null);
_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) {
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) =>
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) =>
ImplementedMember.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'members');
}
return AnalysisImplementedParams(file, classes, members);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.implemented params', json);
}
}
factory AnalysisImplementedParams.fromNotification(
Notification notification) {
return AnalysisImplementedParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
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 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 {
var 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.
set file(String value) {
assert(value != null);
_file = value;
}
/// The offset of the invalidated region.
int get offset => _offset;
/// The offset of the invalidated region.
set offset(int value) {
assert(value != null);
_offset = value;
}
/// The length of the invalidated region.
int get length => _length;
/// The length of the invalidated region.
set length(int value) {
assert(value != null);
_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.
set delta(int value) {
assert(value != null);
_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) {
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 AnalysisInvalidateParams(file, offset, length, delta);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.invalidate params', json);
}
}
factory AnalysisInvalidateParams.fromNotification(Notification notification) {
return AnalysisInvalidateParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['offset'] = offset;
result['length'] = length;
result['delta'] = delta;
return result;
}
Notification toNotification() {
return 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 {
var 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.
set file(String value) {
assert(value != null);
_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.
set regions(List<NavigationRegion> value) {
assert(value != null);
_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.
set targets(List<NavigationTarget> value) {
assert(value != null);
_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.
set files(List<String> value) {
assert(value != null);
_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) {
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) =>
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) =>
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 AnalysisNavigationParams(file, regions, targets, files);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.navigation params', json);
}
}
factory AnalysisNavigationParams.fromNotification(Notification notification) {
return AnalysisNavigationParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
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 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 {
var 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.
set file(String value) {
assert(value != null);
_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.
set occurrences(List<Occurrences> value) {
assert(value != null);
_occurrences = value;
}
AnalysisOccurrencesParams(String file, List<Occurrences> occurrences) {
this.file = file;
this.occurrences = occurrences;
}
factory AnalysisOccurrencesParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
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) =>
Occurrences.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'occurrences');
}
return AnalysisOccurrencesParams(file, occurrences);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.occurrences params', json);
}
}
factory AnalysisOccurrencesParams.fromNotification(
Notification notification) {
return AnalysisOccurrencesParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['occurrences'] =
occurrences.map((Occurrences value) => value.toJson()).toList();
return result;
}
Notification toNotification() {
return 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 {
var 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.
set enableAsync(bool value) {
_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.
set enableDeferredLoading(bool value) {
_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.
set enableEnums(bool value) {
_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.
set enableNullAwareOperators(bool value) {
_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).
set enableSuperMixins(bool value) {
_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.
set generateDart2jsHints(bool value) {
_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.
set generateHints(bool value) {
_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.
set generateLints(bool value) {
_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) {
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['enableSuperMixins']);
}
bool generateDart2jsHints;
if (json.containsKey('generateDart2jsHints')) {
generateDart2jsHints = jsonDecoder.decodeBool(
jsonPath + '.generateDart2jsHints', json['generateDart2jsHints']);
}
bool generateHints;
if (json.containsKey('generateHints')) {
generateHints = jsonDecoder.decodeBool(
jsonPath + '.generateHints', json['generateHints']);
}
bool generateLints;
if (json.containsKey('generateLints')) {
generateLints = jsonDecoder.decodeBool(
jsonPath + '.generateLints', json['generateLints']);
}
return AnalysisOptions(
enableAsync: enableAsync,
enableDeferredLoading: enableDeferredLoading,
enableEnums: enableEnums,
enableNullAwareOperators: enableNullAwareOperators,
enableSuperMixins: enableSuperMixins,
generateDart2jsHints: generateDart2jsHints,
generateHints: generateHints,
generateLints: generateLints);
} else {
throw jsonDecoder.mismatch(jsonPath, 'AnalysisOptions', json);
}
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
if (enableAsync != null) {
result['enableAsync'] = enableAsync;
}
if (enableDeferredLoading != null) {
result['enableDeferredLoading'] = enableDeferredLoading;
}
if (enableEnums != null) {
result['enableEnums'] = enableEnums;
}
if (enableNullAwareOperators != null) {
result['enableNullAwareOperators'] = enableNullAwareOperators;
}
if (enableSuperMixins != null) {
result['enableSuperMixins'] = enableSuperMixins;
}
if (generateDart2jsHints != null) {
result['generateDart2jsHints'] = generateDart2jsHints;
}
if (generateHints != null) {
result['generateHints'] = generateHints;
}
if (generateLints != null) {
result['generateLints'] = generateLints;
}
return result;
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisOptions) {
return enableAsync == other.enableAsync &&
enableDeferredLoading == other.enableDeferredLoading &&
enableEnums == other.enableEnums &&
enableNullAwareOperators == other.enableNullAwareOperators &&
enableSuperMixins == other.enableSuperMixins &&
generateDart2jsHints == other.generateDart2jsHints &&
generateHints == other.generateHints &&
generateLints == other.generateLints;
}
return false;
}
@override
int get hashCode {
var hash = 0;
hash = JenkinsSmiHash.combine(hash, enableAsync.hashCode);
hash = JenkinsSmiHash.combine(hash, enableDeferredLoading.hashCode);
hash = JenkinsSmiHash.combine(hash, enableEnums.hashCode);
hash = JenkinsSmiHash.combine(hash, enableNullAwareOperators.hashCode);
hash = JenkinsSmiHash.combine(hash, enableSuperMixins.hashCode);
hash = JenkinsSmiHash.combine(hash, generateDart2jsHints.hashCode);
hash = JenkinsSmiHash.combine(hash, generateHints.hashCode);
hash = JenkinsSmiHash.combine(hash, generateLints.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/// analysis.outline params
///
/// {
/// "file": FilePath
/// "kind": FileKind
/// "libraryName": optional String
/// "outline": Outline
/// }
///
/// Clients may not extend, implement or mix-in this class.
class AnalysisOutlineParams implements HasToJson {
String _file;
FileKind _kind;
String _libraryName;
Outline _outline;
/// The file with which the outline is associated.
String get file => _file;
/// The file with which the outline is associated.
set file(String value) {
assert(value != null);
_file = value;
}
/// The kind of the file.
FileKind get kind => _kind;
/// The kind of the file.
set kind(FileKind value) {
assert(value != null);
_kind = value;
}
/// The name of the library defined by the file using a "library" directive,
/// or referenced by a "part of" directive. If both "library" and "part of"
/// directives are present, then the "library" directive takes precedence.
/// This field will be omitted if the file has neither "library" nor "part
/// of" directives.
String get libraryName => _libraryName;
/// The name of the library defined by the file using a "library" directive,
/// or referenced by a "part of" directive. If both "library" and "part of"
/// directives are present, then the "library" directive takes precedence.
/// This field will be omitted if the file has neither "library" nor "part
/// of" directives.
set libraryName(String value) {
_libraryName = value;
}
/// The outline associated with the file.
Outline get outline => _outline;
/// The outline associated with the file.
set outline(Outline value) {
assert(value != null);
_outline = value;
}
AnalysisOutlineParams(String file, FileKind kind, Outline outline,
{String libraryName}) {
this.file = file;
this.kind = kind;
this.libraryName = libraryName;
this.outline = outline;
}
factory AnalysisOutlineParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object json) {
json ??= {};
if (json is Map) {
String file;
if (json.containsKey('file')) {
file = jsonDecoder.decodeString(jsonPath + '.file', json['file']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'file');
}
FileKind kind;
if (json.containsKey('kind')) {
kind = FileKind.fromJson(jsonDecoder, jsonPath + '.kind', json['kind']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'kind');
}
String libraryName;
if (json.containsKey('libraryName')) {
libraryName = jsonDecoder.decodeString(
jsonPath + '.libraryName', json['libraryName']);
}
Outline outline;
if (json.containsKey('outline')) {
outline = Outline.fromJson(
jsonDecoder, jsonPath + '.outline', json['outline']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'outline');
}
return AnalysisOutlineParams(file, kind, outline,
libraryName: libraryName);
} else {
throw jsonDecoder.mismatch(jsonPath, 'analysis.outline params', json);
}
}
factory AnalysisOutlineParams.fromNotification(Notification notification) {
return AnalysisOutlineParams.fromJson(
ResponseDecoder(null), 'params', notification.params);
}
@override
Map<String, dynamic> toJson() {
var result = <String, dynamic>{};
result['file'] = file;
result['kind'] = kind.toJson();
if (libraryName != null) {
result['libraryName'] = libraryName;
}
result['outline'] = outline.toJson();
return result;
}
Notification toNotification() {
return Notification('analysis.outline', toJson());
}
@override
String toString() => json.encode(toJson());
@override
bool operator ==(other) {
if (other is AnalysisOutlineParams) {
return file == other.file &&
kind == other.kind &&
libraryName == other.libraryName &&
outline == other.outline;
}
return false;
}
@override
int get hashCode {
var hash = 0;
hash = JenkinsSmiHash.combine(hash, file.hashCode);
hash = JenkinsSmiHash.combine(hash, kind.hashCode);
hash = JenkinsSmiHash.combine(hash, libraryName.hashCode);
hash = JenkinsSmiHash.combine(hash, outline.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
/// analysis.overrides params
///
/// {
/// "file": FilePath
/// "overrides": List<Override>
/// }
///
/// Clients may not extend, implement or mix-in this class.
class AnalysisOverridesParams implements HasToJson {