blob: ff08343d8265ae31849a21d57d3dcc7921e606c7 [file] [log] [blame]
// Copyright (c) 2015, 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 SDK script
// "pkg/analyzer/tool/summary/generate.dart $IDL_FILE_PATH",
// or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.
library analyzer.src.summary.format;
import 'dart:convert' as convert;
import 'package:analyzer/src/summary/api_signature.dart' as api_sig;
import 'package:analyzer/src/summary/flat_buffers.dart' as fb;
import 'idl.dart' as idl;
class _AvailableDeclarationKindReader
extends fb.Reader<idl.AvailableDeclarationKind> {
const _AvailableDeclarationKindReader() : super();
@override
int get size => 1;
@override
idl.AvailableDeclarationKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.AvailableDeclarationKind.values.length
? idl.AvailableDeclarationKind.values[index]
: idl.AvailableDeclarationKind.CLASS;
}
}
class _EntityRefKindReader extends fb.Reader<idl.EntityRefKind> {
const _EntityRefKindReader() : super();
@override
int get size => 1;
@override
idl.EntityRefKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.EntityRefKind.values.length
? idl.EntityRefKind.values[index]
: idl.EntityRefKind.named;
}
}
class _EntityRefNullabilitySuffixReader
extends fb.Reader<idl.EntityRefNullabilitySuffix> {
const _EntityRefNullabilitySuffixReader() : super();
@override
int get size => 1;
@override
idl.EntityRefNullabilitySuffix read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.EntityRefNullabilitySuffix.values.length
? idl.EntityRefNullabilitySuffix.values[index]
: idl.EntityRefNullabilitySuffix.starOrIrrelevant;
}
}
class _IndexNameKindReader extends fb.Reader<idl.IndexNameKind> {
const _IndexNameKindReader() : super();
@override
int get size => 1;
@override
idl.IndexNameKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.IndexNameKind.values.length
? idl.IndexNameKind.values[index]
: idl.IndexNameKind.topLevel;
}
}
class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> {
const _IndexRelationKindReader() : super();
@override
int get size => 1;
@override
idl.IndexRelationKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.IndexRelationKind.values.length
? idl.IndexRelationKind.values[index]
: idl.IndexRelationKind.IS_ANCESTOR_OF;
}
}
class _IndexSyntheticElementKindReader
extends fb.Reader<idl.IndexSyntheticElementKind> {
const _IndexSyntheticElementKindReader() : super();
@override
int get size => 1;
@override
idl.IndexSyntheticElementKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.IndexSyntheticElementKind.values.length
? idl.IndexSyntheticElementKind.values[index]
: idl.IndexSyntheticElementKind.notSynthetic;
}
}
class _LinkedNodeCommentTypeReader
extends fb.Reader<idl.LinkedNodeCommentType> {
const _LinkedNodeCommentTypeReader() : super();
@override
int get size => 1;
@override
idl.LinkedNodeCommentType read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.LinkedNodeCommentType.values.length
? idl.LinkedNodeCommentType.values[index]
: idl.LinkedNodeCommentType.block;
}
}
class _LinkedNodeFormalParameterKindReader
extends fb.Reader<idl.LinkedNodeFormalParameterKind> {
const _LinkedNodeFormalParameterKindReader() : super();
@override
int get size => 1;
@override
idl.LinkedNodeFormalParameterKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.LinkedNodeFormalParameterKind.values.length
? idl.LinkedNodeFormalParameterKind.values[index]
: idl.LinkedNodeFormalParameterKind.requiredPositional;
}
}
class _LinkedNodeKindReader extends fb.Reader<idl.LinkedNodeKind> {
const _LinkedNodeKindReader() : super();
@override
int get size => 1;
@override
idl.LinkedNodeKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.LinkedNodeKind.values.length
? idl.LinkedNodeKind.values[index]
: idl.LinkedNodeKind.adjacentStrings;
}
}
class _LinkedNodeTypeKindReader extends fb.Reader<idl.LinkedNodeTypeKind> {
const _LinkedNodeTypeKindReader() : super();
@override
int get size => 1;
@override
idl.LinkedNodeTypeKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.LinkedNodeTypeKind.values.length
? idl.LinkedNodeTypeKind.values[index]
: idl.LinkedNodeTypeKind.bottom;
}
}
class _ReferenceKindReader extends fb.Reader<idl.ReferenceKind> {
const _ReferenceKindReader() : super();
@override
int get size => 1;
@override
idl.ReferenceKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.ReferenceKind.values.length
? idl.ReferenceKind.values[index]
: idl.ReferenceKind.classOrEnum;
}
}
class _TopLevelInferenceErrorKindReader
extends fb.Reader<idl.TopLevelInferenceErrorKind> {
const _TopLevelInferenceErrorKindReader() : super();
@override
int get size => 1;
@override
idl.TopLevelInferenceErrorKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.TopLevelInferenceErrorKind.values.length
? idl.TopLevelInferenceErrorKind.values[index]
: idl.TopLevelInferenceErrorKind.assignment;
}
}
class _TypedefStyleReader extends fb.Reader<idl.TypedefStyle> {
const _TypedefStyleReader() : super();
@override
int get size => 1;
@override
idl.TypedefStyle read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.TypedefStyle.values.length
? idl.TypedefStyle.values[index]
: idl.TypedefStyle.functionType;
}
}
class _UnlinkedConstructorInitializerKindReader
extends fb.Reader<idl.UnlinkedConstructorInitializerKind> {
const _UnlinkedConstructorInitializerKindReader() : super();
@override
int get size => 1;
@override
idl.UnlinkedConstructorInitializerKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.UnlinkedConstructorInitializerKind.values.length
? idl.UnlinkedConstructorInitializerKind.values[index]
: idl.UnlinkedConstructorInitializerKind.field;
}
}
class _UnlinkedExecutableKindReader
extends fb.Reader<idl.UnlinkedExecutableKind> {
const _UnlinkedExecutableKindReader() : super();
@override
int get size => 1;
@override
idl.UnlinkedExecutableKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.UnlinkedExecutableKind.values.length
? idl.UnlinkedExecutableKind.values[index]
: idl.UnlinkedExecutableKind.functionOrMethod;
}
}
class _UnlinkedExprAssignOperatorReader
extends fb.Reader<idl.UnlinkedExprAssignOperator> {
const _UnlinkedExprAssignOperatorReader() : super();
@override
int get size => 1;
@override
idl.UnlinkedExprAssignOperator read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.UnlinkedExprAssignOperator.values.length
? idl.UnlinkedExprAssignOperator.values[index]
: idl.UnlinkedExprAssignOperator.assign;
}
}
class _UnlinkedExprOperationReader
extends fb.Reader<idl.UnlinkedExprOperation> {
const _UnlinkedExprOperationReader() : super();
@override
int get size => 1;
@override
idl.UnlinkedExprOperation read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.UnlinkedExprOperation.values.length
? idl.UnlinkedExprOperation.values[index]
: idl.UnlinkedExprOperation.pushInt;
}
}
class _UnlinkedParamKindReader extends fb.Reader<idl.UnlinkedParamKind> {
const _UnlinkedParamKindReader() : super();
@override
int get size => 1;
@override
idl.UnlinkedParamKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.UnlinkedParamKind.values.length
? idl.UnlinkedParamKind.values[index]
: idl.UnlinkedParamKind.requiredPositional;
}
}
class _UnlinkedTokenKindReader extends fb.Reader<idl.UnlinkedTokenKind> {
const _UnlinkedTokenKindReader() : super();
@override
int get size => 1;
@override
idl.UnlinkedTokenKind read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.UnlinkedTokenKind.values.length
? idl.UnlinkedTokenKind.values[index]
: idl.UnlinkedTokenKind.nothing;
}
}
class _UnlinkedTokenTypeReader extends fb.Reader<idl.UnlinkedTokenType> {
const _UnlinkedTokenTypeReader() : super();
@override
int get size => 1;
@override
idl.UnlinkedTokenType read(fb.BufferContext bc, int offset) {
int index = const fb.Uint8Reader().read(bc, offset);
return index < idl.UnlinkedTokenType.values.length
? idl.UnlinkedTokenType.values[index]
: idl.UnlinkedTokenType.NOTHING;
}
}
class AnalysisDriverExceptionContextBuilder extends Object
with _AnalysisDriverExceptionContextMixin
implements idl.AnalysisDriverExceptionContext {
String _exception;
List<AnalysisDriverExceptionFileBuilder> _files;
String _path;
String _stackTrace;
@override
String get exception => _exception ??= '';
/// The exception string.
set exception(String value) {
this._exception = value;
}
@override
List<AnalysisDriverExceptionFileBuilder> get files =>
_files ??= <AnalysisDriverExceptionFileBuilder>[];
/// The state of files when the exception happened.
set files(List<AnalysisDriverExceptionFileBuilder> value) {
this._files = value;
}
@override
String get path => _path ??= '';
/// The path of the file being analyzed when the exception happened.
set path(String value) {
this._path = value;
}
@override
String get stackTrace => _stackTrace ??= '';
/// The exception stack trace string.
set stackTrace(String value) {
this._stackTrace = value;
}
AnalysisDriverExceptionContextBuilder(
{String exception,
List<AnalysisDriverExceptionFileBuilder> files,
String path,
String stackTrace})
: _exception = exception,
_files = files,
_path = path,
_stackTrace = stackTrace;
/// Flush [informative] data recursively.
void flushInformative() {
_files?.forEach((b) => b.flushInformative());
}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
signature.addString(this._path ?? '');
signature.addString(this._exception ?? '');
signature.addString(this._stackTrace ?? '');
if (this._files == null) {
signature.addInt(0);
} else {
signature.addInt(this._files.length);
for (var x in this._files) {
x?.collectApiSignature(signature);
}
}
}
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "ADEC");
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_exception;
fb.Offset offset_files;
fb.Offset offset_path;
fb.Offset offset_stackTrace;
if (_exception != null) {
offset_exception = fbBuilder.writeString(_exception);
}
if (!(_files == null || _files.isEmpty)) {
offset_files =
fbBuilder.writeList(_files.map((b) => b.finish(fbBuilder)).toList());
}
if (_path != null) {
offset_path = fbBuilder.writeString(_path);
}
if (_stackTrace != null) {
offset_stackTrace = fbBuilder.writeString(_stackTrace);
}
fbBuilder.startTable();
if (offset_exception != null) {
fbBuilder.addOffset(1, offset_exception);
}
if (offset_files != null) {
fbBuilder.addOffset(3, offset_files);
}
if (offset_path != null) {
fbBuilder.addOffset(0, offset_path);
}
if (offset_stackTrace != null) {
fbBuilder.addOffset(2, offset_stackTrace);
}
return fbBuilder.endTable();
}
}
idl.AnalysisDriverExceptionContext readAnalysisDriverExceptionContext(
List<int> buffer) {
fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer);
return const _AnalysisDriverExceptionContextReader().read(rootRef, 0);
}
class _AnalysisDriverExceptionContextReader
extends fb.TableReader<_AnalysisDriverExceptionContextImpl> {
const _AnalysisDriverExceptionContextReader();
@override
_AnalysisDriverExceptionContextImpl createObject(
fb.BufferContext bc, int offset) =>
new _AnalysisDriverExceptionContextImpl(bc, offset);
}
class _AnalysisDriverExceptionContextImpl extends Object
with _AnalysisDriverExceptionContextMixin
implements idl.AnalysisDriverExceptionContext {
final fb.BufferContext _bc;
final int _bcOffset;
_AnalysisDriverExceptionContextImpl(this._bc, this._bcOffset);
String _exception;
List<idl.AnalysisDriverExceptionFile> _files;
String _path;
String _stackTrace;
@override
String get exception {
_exception ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, '');
return _exception;
}
@override
List<idl.AnalysisDriverExceptionFile> get files {
_files ??= const fb.ListReader<idl.AnalysisDriverExceptionFile>(
const _AnalysisDriverExceptionFileReader())
.vTableGet(
_bc, _bcOffset, 3, const <idl.AnalysisDriverExceptionFile>[]);
return _files;
}
@override
String get path {
_path ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
return _path;
}
@override
String get stackTrace {
_stackTrace ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, '');
return _stackTrace;
}
}
abstract class _AnalysisDriverExceptionContextMixin
implements idl.AnalysisDriverExceptionContext {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (exception != '') _result["exception"] = exception;
if (files.isNotEmpty)
_result["files"] = files.map((_value) => _value.toJson()).toList();
if (path != '') _result["path"] = path;
if (stackTrace != '') _result["stackTrace"] = stackTrace;
return _result;
}
@override
Map<String, Object> toMap() => {
"exception": exception,
"files": files,
"path": path,
"stackTrace": stackTrace,
};
@override
String toString() => convert.json.encode(toJson());
}
class AnalysisDriverExceptionFileBuilder extends Object
with _AnalysisDriverExceptionFileMixin
implements idl.AnalysisDriverExceptionFile {
String _content;
String _path;
@override
String get content => _content ??= '';
/// The content of the file.
set content(String value) {
this._content = value;
}
@override
String get path => _path ??= '';
/// The path of the file.
set path(String value) {
this._path = value;
}
AnalysisDriverExceptionFileBuilder({String content, String path})
: _content = content,
_path = path;
/// Flush [informative] data recursively.
void flushInformative() {}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
signature.addString(this._path ?? '');
signature.addString(this._content ?? '');
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_content;
fb.Offset offset_path;
if (_content != null) {
offset_content = fbBuilder.writeString(_content);
}
if (_path != null) {
offset_path = fbBuilder.writeString(_path);
}
fbBuilder.startTable();
if (offset_content != null) {
fbBuilder.addOffset(1, offset_content);
}
if (offset_path != null) {
fbBuilder.addOffset(0, offset_path);
}
return fbBuilder.endTable();
}
}
class _AnalysisDriverExceptionFileReader
extends fb.TableReader<_AnalysisDriverExceptionFileImpl> {
const _AnalysisDriverExceptionFileReader();
@override
_AnalysisDriverExceptionFileImpl createObject(
fb.BufferContext bc, int offset) =>
new _AnalysisDriverExceptionFileImpl(bc, offset);
}
class _AnalysisDriverExceptionFileImpl extends Object
with _AnalysisDriverExceptionFileMixin
implements idl.AnalysisDriverExceptionFile {
final fb.BufferContext _bc;
final int _bcOffset;
_AnalysisDriverExceptionFileImpl(this._bc, this._bcOffset);
String _content;
String _path;
@override
String get content {
_content ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, '');
return _content;
}
@override
String get path {
_path ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
return _path;
}
}
abstract class _AnalysisDriverExceptionFileMixin
implements idl.AnalysisDriverExceptionFile {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (content != '') _result["content"] = content;
if (path != '') _result["path"] = path;
return _result;
}
@override
Map<String, Object> toMap() => {
"content": content,
"path": path,
};
@override
String toString() => convert.json.encode(toJson());
}
class AnalysisDriverResolvedUnitBuilder extends Object
with _AnalysisDriverResolvedUnitMixin
implements idl.AnalysisDriverResolvedUnit {
List<AnalysisDriverUnitErrorBuilder> _errors;
AnalysisDriverUnitIndexBuilder _index;
@override
List<AnalysisDriverUnitErrorBuilder> get errors =>
_errors ??= <AnalysisDriverUnitErrorBuilder>[];
/// The full list of analysis errors, both syntactic and semantic.
set errors(List<AnalysisDriverUnitErrorBuilder> value) {
this._errors = value;
}
@override
AnalysisDriverUnitIndexBuilder get index => _index;
/// The index of the unit.
set index(AnalysisDriverUnitIndexBuilder value) {
this._index = value;
}
AnalysisDriverResolvedUnitBuilder(
{List<AnalysisDriverUnitErrorBuilder> errors,
AnalysisDriverUnitIndexBuilder index})
: _errors = errors,
_index = index;
/// Flush [informative] data recursively.
void flushInformative() {
_errors?.forEach((b) => b.flushInformative());
_index?.flushInformative();
}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
if (this._errors == null) {
signature.addInt(0);
} else {
signature.addInt(this._errors.length);
for (var x in this._errors) {
x?.collectApiSignature(signature);
}
}
signature.addBool(this._index != null);
this._index?.collectApiSignature(signature);
}
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "ADRU");
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_errors;
fb.Offset offset_index;
if (!(_errors == null || _errors.isEmpty)) {
offset_errors =
fbBuilder.writeList(_errors.map((b) => b.finish(fbBuilder)).toList());
}
if (_index != null) {
offset_index = _index.finish(fbBuilder);
}
fbBuilder.startTable();
if (offset_errors != null) {
fbBuilder.addOffset(0, offset_errors);
}
if (offset_index != null) {
fbBuilder.addOffset(1, offset_index);
}
return fbBuilder.endTable();
}
}
idl.AnalysisDriverResolvedUnit readAnalysisDriverResolvedUnit(
List<int> buffer) {
fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer);
return const _AnalysisDriverResolvedUnitReader().read(rootRef, 0);
}
class _AnalysisDriverResolvedUnitReader
extends fb.TableReader<_AnalysisDriverResolvedUnitImpl> {
const _AnalysisDriverResolvedUnitReader();
@override
_AnalysisDriverResolvedUnitImpl createObject(
fb.BufferContext bc, int offset) =>
new _AnalysisDriverResolvedUnitImpl(bc, offset);
}
class _AnalysisDriverResolvedUnitImpl extends Object
with _AnalysisDriverResolvedUnitMixin
implements idl.AnalysisDriverResolvedUnit {
final fb.BufferContext _bc;
final int _bcOffset;
_AnalysisDriverResolvedUnitImpl(this._bc, this._bcOffset);
List<idl.AnalysisDriverUnitError> _errors;
idl.AnalysisDriverUnitIndex _index;
@override
List<idl.AnalysisDriverUnitError> get errors {
_errors ??= const fb.ListReader<idl.AnalysisDriverUnitError>(
const _AnalysisDriverUnitErrorReader())
.vTableGet(_bc, _bcOffset, 0, const <idl.AnalysisDriverUnitError>[]);
return _errors;
}
@override
idl.AnalysisDriverUnitIndex get index {
_index ??= const _AnalysisDriverUnitIndexReader()
.vTableGet(_bc, _bcOffset, 1, null);
return _index;
}
}
abstract class _AnalysisDriverResolvedUnitMixin
implements idl.AnalysisDriverResolvedUnit {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (errors.isNotEmpty)
_result["errors"] = errors.map((_value) => _value.toJson()).toList();
if (index != null) _result["index"] = index.toJson();
return _result;
}
@override
Map<String, Object> toMap() => {
"errors": errors,
"index": index,
};
@override
String toString() => convert.json.encode(toJson());
}
class AnalysisDriverSubtypeBuilder extends Object
with _AnalysisDriverSubtypeMixin
implements idl.AnalysisDriverSubtype {
List<int> _members;
int _name;
@override
List<int> get members => _members ??= <int>[];
/// The names of defined instance members.
/// They are indexes into [AnalysisDriverUnitError.strings] list.
/// The list is sorted in ascending order.
set members(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._members = value;
}
@override
int get name => _name ??= 0;
/// The name of the class.
/// It is an index into [AnalysisDriverUnitError.strings] list.
set name(int value) {
assert(value == null || value >= 0);
this._name = value;
}
AnalysisDriverSubtypeBuilder({List<int> members, int name})
: _members = members,
_name = name;
/// Flush [informative] data recursively.
void flushInformative() {}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
signature.addInt(this._name ?? 0);
if (this._members == null) {
signature.addInt(0);
} else {
signature.addInt(this._members.length);
for (var x in this._members) {
signature.addInt(x);
}
}
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_members;
if (!(_members == null || _members.isEmpty)) {
offset_members = fbBuilder.writeListUint32(_members);
}
fbBuilder.startTable();
if (offset_members != null) {
fbBuilder.addOffset(1, offset_members);
}
if (_name != null && _name != 0) {
fbBuilder.addUint32(0, _name);
}
return fbBuilder.endTable();
}
}
class _AnalysisDriverSubtypeReader
extends fb.TableReader<_AnalysisDriverSubtypeImpl> {
const _AnalysisDriverSubtypeReader();
@override
_AnalysisDriverSubtypeImpl createObject(fb.BufferContext bc, int offset) =>
new _AnalysisDriverSubtypeImpl(bc, offset);
}
class _AnalysisDriverSubtypeImpl extends Object
with _AnalysisDriverSubtypeMixin
implements idl.AnalysisDriverSubtype {
final fb.BufferContext _bc;
final int _bcOffset;
_AnalysisDriverSubtypeImpl(this._bc, this._bcOffset);
List<int> _members;
int _name;
@override
List<int> get members {
_members ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 1, const <int>[]);
return _members;
}
@override
int get name {
_name ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0);
return _name;
}
}
abstract class _AnalysisDriverSubtypeMixin
implements idl.AnalysisDriverSubtype {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (members.isNotEmpty) _result["members"] = members;
if (name != 0) _result["name"] = name;
return _result;
}
@override
Map<String, Object> toMap() => {
"members": members,
"name": name,
};
@override
String toString() => convert.json.encode(toJson());
}
class AnalysisDriverUnitErrorBuilder extends Object
with _AnalysisDriverUnitErrorMixin
implements idl.AnalysisDriverUnitError {
String _correction;
int _length;
String _message;
int _offset;
String _uniqueName;
@override
String get correction => _correction ??= '';
/// The optional correction hint for the error.
set correction(String value) {
this._correction = value;
}
@override
int get length => _length ??= 0;
/// The length of the error in the file.
set length(int value) {
assert(value == null || value >= 0);
this._length = value;
}
@override
String get message => _message ??= '';
/// The message of the error.
set message(String value) {
this._message = value;
}
@override
int get offset => _offset ??= 0;
/// The offset from the beginning of the file.
set offset(int value) {
assert(value == null || value >= 0);
this._offset = value;
}
@override
String get uniqueName => _uniqueName ??= '';
/// The unique name of the error code.
set uniqueName(String value) {
this._uniqueName = value;
}
AnalysisDriverUnitErrorBuilder(
{String correction,
int length,
String message,
int offset,
String uniqueName})
: _correction = correction,
_length = length,
_message = message,
_offset = offset,
_uniqueName = uniqueName;
/// Flush [informative] data recursively.
void flushInformative() {}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
signature.addInt(this._offset ?? 0);
signature.addInt(this._length ?? 0);
signature.addString(this._uniqueName ?? '');
signature.addString(this._message ?? '');
signature.addString(this._correction ?? '');
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_correction;
fb.Offset offset_message;
fb.Offset offset_uniqueName;
if (_correction != null) {
offset_correction = fbBuilder.writeString(_correction);
}
if (_message != null) {
offset_message = fbBuilder.writeString(_message);
}
if (_uniqueName != null) {
offset_uniqueName = fbBuilder.writeString(_uniqueName);
}
fbBuilder.startTable();
if (offset_correction != null) {
fbBuilder.addOffset(4, offset_correction);
}
if (_length != null && _length != 0) {
fbBuilder.addUint32(1, _length);
}
if (offset_message != null) {
fbBuilder.addOffset(3, offset_message);
}
if (_offset != null && _offset != 0) {
fbBuilder.addUint32(0, _offset);
}
if (offset_uniqueName != null) {
fbBuilder.addOffset(2, offset_uniqueName);
}
return fbBuilder.endTable();
}
}
class _AnalysisDriverUnitErrorReader
extends fb.TableReader<_AnalysisDriverUnitErrorImpl> {
const _AnalysisDriverUnitErrorReader();
@override
_AnalysisDriverUnitErrorImpl createObject(fb.BufferContext bc, int offset) =>
new _AnalysisDriverUnitErrorImpl(bc, offset);
}
class _AnalysisDriverUnitErrorImpl extends Object
with _AnalysisDriverUnitErrorMixin
implements idl.AnalysisDriverUnitError {
final fb.BufferContext _bc;
final int _bcOffset;
_AnalysisDriverUnitErrorImpl(this._bc, this._bcOffset);
String _correction;
int _length;
String _message;
int _offset;
String _uniqueName;
@override
String get correction {
_correction ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 4, '');
return _correction;
}
@override
int get length {
_length ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0);
return _length;
}
@override
String get message {
_message ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 3, '');
return _message;
}
@override
int get offset {
_offset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 0, 0);
return _offset;
}
@override
String get uniqueName {
_uniqueName ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 2, '');
return _uniqueName;
}
}
abstract class _AnalysisDriverUnitErrorMixin
implements idl.AnalysisDriverUnitError {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (correction != '') _result["correction"] = correction;
if (length != 0) _result["length"] = length;
if (message != '') _result["message"] = message;
if (offset != 0) _result["offset"] = offset;
if (uniqueName != '') _result["uniqueName"] = uniqueName;
return _result;
}
@override
Map<String, Object> toMap() => {
"correction": correction,
"length": length,
"message": message,
"offset": offset,
"uniqueName": uniqueName,
};
@override
String toString() => convert.json.encode(toJson());
}
class AnalysisDriverUnitIndexBuilder extends Object
with _AnalysisDriverUnitIndexMixin
implements idl.AnalysisDriverUnitIndex {
List<idl.IndexSyntheticElementKind> _elementKinds;
List<int> _elementNameClassMemberIds;
List<int> _elementNameParameterIds;
List<int> _elementNameUnitMemberIds;
List<int> _elementUnits;
int _nullStringId;
List<String> _strings;
List<AnalysisDriverSubtypeBuilder> _subtypes;
List<int> _supertypes;
List<int> _unitLibraryUris;
List<int> _unitUnitUris;
List<bool> _usedElementIsQualifiedFlags;
List<idl.IndexRelationKind> _usedElementKinds;
List<int> _usedElementLengths;
List<int> _usedElementOffsets;
List<int> _usedElements;
List<bool> _usedNameIsQualifiedFlags;
List<idl.IndexRelationKind> _usedNameKinds;
List<int> _usedNameOffsets;
List<int> _usedNames;
@override
List<idl.IndexSyntheticElementKind> get elementKinds =>
_elementKinds ??= <idl.IndexSyntheticElementKind>[];
/// Each item of this list corresponds to a unique referenced element. It is
/// the kind of the synthetic element.
set elementKinds(List<idl.IndexSyntheticElementKind> value) {
this._elementKinds = value;
}
@override
List<int> get elementNameClassMemberIds =>
_elementNameClassMemberIds ??= <int>[];
/// Each item of this list corresponds to a unique referenced element. It is
/// the identifier of the class member element name, or `null` if the element
/// is a top-level element. The list is sorted in ascending order, so that
/// the client can quickly check whether an element is referenced in this
/// index.
set elementNameClassMemberIds(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._elementNameClassMemberIds = value;
}
@override
List<int> get elementNameParameterIds => _elementNameParameterIds ??= <int>[];
/// Each item of this list corresponds to a unique referenced element. It is
/// the identifier of the named parameter name, or `null` if the element is
/// not a named parameter. The list is sorted in ascending order, so that the
/// client can quickly check whether an element is referenced in this index.
set elementNameParameterIds(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._elementNameParameterIds = value;
}
@override
List<int> get elementNameUnitMemberIds =>
_elementNameUnitMemberIds ??= <int>[];
/// Each item of this list corresponds to a unique referenced element. It is
/// the identifier of the top-level element name, or `null` if the element is
/// the unit. The list is sorted in ascending order, so that the client can
/// quickly check whether an element is referenced in this index.
set elementNameUnitMemberIds(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._elementNameUnitMemberIds = value;
}
@override
List<int> get elementUnits => _elementUnits ??= <int>[];
/// Each item of this list corresponds to a unique referenced element. It is
/// the index into [unitLibraryUris] and [unitUnitUris] for the library
/// specific unit where the element is declared.
set elementUnits(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._elementUnits = value;
}
@override
int get nullStringId => _nullStringId ??= 0;
/// Identifier of the null string in [strings].
set nullStringId(int value) {
assert(value == null || value >= 0);
this._nullStringId = value;
}
@override
List<String> get strings => _strings ??= <String>[];
/// List of unique element strings used in this index. The list is sorted in
/// ascending order, so that the client can quickly check the presence of a
/// string in this index.
set strings(List<String> value) {
this._strings = value;
}
@override
List<AnalysisDriverSubtypeBuilder> get subtypes =>
_subtypes ??= <AnalysisDriverSubtypeBuilder>[];
/// The list of classes declared in the unit.
set subtypes(List<AnalysisDriverSubtypeBuilder> value) {
this._subtypes = value;
}
@override
List<int> get supertypes => _supertypes ??= <int>[];
/// The identifiers of supertypes of elements at corresponding indexes
/// in [subtypes]. They are indexes into [strings] list. The list is sorted
/// in ascending order. There might be more than one element with the same
/// value if there is more than one subtype of this supertype.
set supertypes(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._supertypes = value;
}
@override
List<int> get unitLibraryUris => _unitLibraryUris ??= <int>[];
/// Each item of this list corresponds to the library URI of a unique library
/// specific unit referenced in the index. It is an index into [strings]
/// list.
set unitLibraryUris(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._unitLibraryUris = value;
}
@override
List<int> get unitUnitUris => _unitUnitUris ??= <int>[];
/// Each item of this list corresponds to the unit URI of a unique library
/// specific unit referenced in the index. It is an index into [strings]
/// list.
set unitUnitUris(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._unitUnitUris = value;
}
@override
List<bool> get usedElementIsQualifiedFlags =>
_usedElementIsQualifiedFlags ??= <bool>[];
/// Each item of this list is the `true` if the corresponding element usage
/// is qualified with some prefix.
set usedElementIsQualifiedFlags(List<bool> value) {
this._usedElementIsQualifiedFlags = value;
}
@override
List<idl.IndexRelationKind> get usedElementKinds =>
_usedElementKinds ??= <idl.IndexRelationKind>[];
/// Each item of this list is the kind of the element usage.
set usedElementKinds(List<idl.IndexRelationKind> value) {
this._usedElementKinds = value;
}
@override
List<int> get usedElementLengths => _usedElementLengths ??= <int>[];
/// Each item of this list is the length of the element usage.
set usedElementLengths(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._usedElementLengths = value;
}
@override
List<int> get usedElementOffsets => _usedElementOffsets ??= <int>[];
/// Each item of this list is the offset of the element usage relative to the
/// beginning of the file.
set usedElementOffsets(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._usedElementOffsets = value;
}
@override
List<int> get usedElements => _usedElements ??= <int>[];
/// Each item of this list is the index into [elementUnits],
/// [elementNameUnitMemberIds], [elementNameClassMemberIds] and
/// [elementNameParameterIds]. The list is sorted in ascending order, so
/// that the client can quickly find element references in this index.
set usedElements(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._usedElements = value;
}
@override
List<bool> get usedNameIsQualifiedFlags =>
_usedNameIsQualifiedFlags ??= <bool>[];
/// Each item of this list is the `true` if the corresponding name usage
/// is qualified with some prefix.
set usedNameIsQualifiedFlags(List<bool> value) {
this._usedNameIsQualifiedFlags = value;
}
@override
List<idl.IndexRelationKind> get usedNameKinds =>
_usedNameKinds ??= <idl.IndexRelationKind>[];
/// Each item of this list is the kind of the name usage.
set usedNameKinds(List<idl.IndexRelationKind> value) {
this._usedNameKinds = value;
}
@override
List<int> get usedNameOffsets => _usedNameOffsets ??= <int>[];
/// Each item of this list is the offset of the name usage relative to the
/// beginning of the file.
set usedNameOffsets(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._usedNameOffsets = value;
}
@override
List<int> get usedNames => _usedNames ??= <int>[];
/// Each item of this list is the index into [strings] for a used name. The
/// list is sorted in ascending order, so that the client can quickly find
/// whether a name is used in this index.
set usedNames(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._usedNames = value;
}
AnalysisDriverUnitIndexBuilder(
{List<idl.IndexSyntheticElementKind> elementKinds,
List<int> elementNameClassMemberIds,
List<int> elementNameParameterIds,
List<int> elementNameUnitMemberIds,
List<int> elementUnits,
int nullStringId,
List<String> strings,
List<AnalysisDriverSubtypeBuilder> subtypes,
List<int> supertypes,
List<int> unitLibraryUris,
List<int> unitUnitUris,
List<bool> usedElementIsQualifiedFlags,
List<idl.IndexRelationKind> usedElementKinds,
List<int> usedElementLengths,
List<int> usedElementOffsets,
List<int> usedElements,
List<bool> usedNameIsQualifiedFlags,
List<idl.IndexRelationKind> usedNameKinds,
List<int> usedNameOffsets,
List<int> usedNames})
: _elementKinds = elementKinds,
_elementNameClassMemberIds = elementNameClassMemberIds,
_elementNameParameterIds = elementNameParameterIds,
_elementNameUnitMemberIds = elementNameUnitMemberIds,
_elementUnits = elementUnits,
_nullStringId = nullStringId,
_strings = strings,
_subtypes = subtypes,
_supertypes = supertypes,
_unitLibraryUris = unitLibraryUris,
_unitUnitUris = unitUnitUris,
_usedElementIsQualifiedFlags = usedElementIsQualifiedFlags,
_usedElementKinds = usedElementKinds,
_usedElementLengths = usedElementLengths,
_usedElementOffsets = usedElementOffsets,
_usedElements = usedElements,
_usedNameIsQualifiedFlags = usedNameIsQualifiedFlags,
_usedNameKinds = usedNameKinds,
_usedNameOffsets = usedNameOffsets,
_usedNames = usedNames;
/// Flush [informative] data recursively.
void flushInformative() {
_subtypes?.forEach((b) => b.flushInformative());
}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
if (this._strings == null) {
signature.addInt(0);
} else {
signature.addInt(this._strings.length);
for (var x in this._strings) {
signature.addString(x);
}
}
signature.addInt(this._nullStringId ?? 0);
if (this._unitLibraryUris == null) {
signature.addInt(0);
} else {
signature.addInt(this._unitLibraryUris.length);
for (var x in this._unitLibraryUris) {
signature.addInt(x);
}
}
if (this._unitUnitUris == null) {
signature.addInt(0);
} else {
signature.addInt(this._unitUnitUris.length);
for (var x in this._unitUnitUris) {
signature.addInt(x);
}
}
if (this._elementKinds == null) {
signature.addInt(0);
} else {
signature.addInt(this._elementKinds.length);
for (var x in this._elementKinds) {
signature.addInt(x.index);
}
}
if (this._elementUnits == null) {
signature.addInt(0);
} else {
signature.addInt(this._elementUnits.length);
for (var x in this._elementUnits) {
signature.addInt(x);
}
}
if (this._elementNameUnitMemberIds == null) {
signature.addInt(0);
} else {
signature.addInt(this._elementNameUnitMemberIds.length);
for (var x in this._elementNameUnitMemberIds) {
signature.addInt(x);
}
}
if (this._elementNameClassMemberIds == null) {
signature.addInt(0);
} else {
signature.addInt(this._elementNameClassMemberIds.length);
for (var x in this._elementNameClassMemberIds) {
signature.addInt(x);
}
}
if (this._elementNameParameterIds == null) {
signature.addInt(0);
} else {
signature.addInt(this._elementNameParameterIds.length);
for (var x in this._elementNameParameterIds) {
signature.addInt(x);
}
}
if (this._usedElements == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedElements.length);
for (var x in this._usedElements) {
signature.addInt(x);
}
}
if (this._usedElementKinds == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedElementKinds.length);
for (var x in this._usedElementKinds) {
signature.addInt(x.index);
}
}
if (this._usedElementOffsets == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedElementOffsets.length);
for (var x in this._usedElementOffsets) {
signature.addInt(x);
}
}
if (this._usedElementLengths == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedElementLengths.length);
for (var x in this._usedElementLengths) {
signature.addInt(x);
}
}
if (this._usedElementIsQualifiedFlags == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedElementIsQualifiedFlags.length);
for (var x in this._usedElementIsQualifiedFlags) {
signature.addBool(x);
}
}
if (this._usedNames == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedNames.length);
for (var x in this._usedNames) {
signature.addInt(x);
}
}
if (this._usedNameKinds == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedNameKinds.length);
for (var x in this._usedNameKinds) {
signature.addInt(x.index);
}
}
if (this._usedNameOffsets == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedNameOffsets.length);
for (var x in this._usedNameOffsets) {
signature.addInt(x);
}
}
if (this._usedNameIsQualifiedFlags == null) {
signature.addInt(0);
} else {
signature.addInt(this._usedNameIsQualifiedFlags.length);
for (var x in this._usedNameIsQualifiedFlags) {
signature.addBool(x);
}
}
if (this._supertypes == null) {
signature.addInt(0);
} else {
signature.addInt(this._supertypes.length);
for (var x in this._supertypes) {
signature.addInt(x);
}
}
if (this._subtypes == null) {
signature.addInt(0);
} else {
signature.addInt(this._subtypes.length);
for (var x in this._subtypes) {
x?.collectApiSignature(signature);
}
}
}
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "ADUI");
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_elementKinds;
fb.Offset offset_elementNameClassMemberIds;
fb.Offset offset_elementNameParameterIds;
fb.Offset offset_elementNameUnitMemberIds;
fb.Offset offset_elementUnits;
fb.Offset offset_strings;
fb.Offset offset_subtypes;
fb.Offset offset_supertypes;
fb.Offset offset_unitLibraryUris;
fb.Offset offset_unitUnitUris;
fb.Offset offset_usedElementIsQualifiedFlags;
fb.Offset offset_usedElementKinds;
fb.Offset offset_usedElementLengths;
fb.Offset offset_usedElementOffsets;
fb.Offset offset_usedElements;
fb.Offset offset_usedNameIsQualifiedFlags;
fb.Offset offset_usedNameKinds;
fb.Offset offset_usedNameOffsets;
fb.Offset offset_usedNames;
if (!(_elementKinds == null || _elementKinds.isEmpty)) {
offset_elementKinds =
fbBuilder.writeListUint8(_elementKinds.map((b) => b.index).toList());
}
if (!(_elementNameClassMemberIds == null ||
_elementNameClassMemberIds.isEmpty)) {
offset_elementNameClassMemberIds =
fbBuilder.writeListUint32(_elementNameClassMemberIds);
}
if (!(_elementNameParameterIds == null ||
_elementNameParameterIds.isEmpty)) {
offset_elementNameParameterIds =
fbBuilder.writeListUint32(_elementNameParameterIds);
}
if (!(_elementNameUnitMemberIds == null ||
_elementNameUnitMemberIds.isEmpty)) {
offset_elementNameUnitMemberIds =
fbBuilder.writeListUint32(_elementNameUnitMemberIds);
}
if (!(_elementUnits == null || _elementUnits.isEmpty)) {
offset_elementUnits = fbBuilder.writeListUint32(_elementUnits);
}
if (!(_strings == null || _strings.isEmpty)) {
offset_strings = fbBuilder
.writeList(_strings.map((b) => fbBuilder.writeString(b)).toList());
}
if (!(_subtypes == null || _subtypes.isEmpty)) {
offset_subtypes = fbBuilder
.writeList(_subtypes.map((b) => b.finish(fbBuilder)).toList());
}
if (!(_supertypes == null || _supertypes.isEmpty)) {
offset_supertypes = fbBuilder.writeListUint32(_supertypes);
}
if (!(_unitLibraryUris == null || _unitLibraryUris.isEmpty)) {
offset_unitLibraryUris = fbBuilder.writeListUint32(_unitLibraryUris);
}
if (!(_unitUnitUris == null || _unitUnitUris.isEmpty)) {
offset_unitUnitUris = fbBuilder.writeListUint32(_unitUnitUris);
}
if (!(_usedElementIsQualifiedFlags == null ||
_usedElementIsQualifiedFlags.isEmpty)) {
offset_usedElementIsQualifiedFlags =
fbBuilder.writeListBool(_usedElementIsQualifiedFlags);
}
if (!(_usedElementKinds == null || _usedElementKinds.isEmpty)) {
offset_usedElementKinds = fbBuilder
.writeListUint8(_usedElementKinds.map((b) => b.index).toList());
}
if (!(_usedElementLengths == null || _usedElementLengths.isEmpty)) {
offset_usedElementLengths =
fbBuilder.writeListUint32(_usedElementLengths);
}
if (!(_usedElementOffsets == null || _usedElementOffsets.isEmpty)) {
offset_usedElementOffsets =
fbBuilder.writeListUint32(_usedElementOffsets);
}
if (!(_usedElements == null || _usedElements.isEmpty)) {
offset_usedElements = fbBuilder.writeListUint32(_usedElements);
}
if (!(_usedNameIsQualifiedFlags == null ||
_usedNameIsQualifiedFlags.isEmpty)) {
offset_usedNameIsQualifiedFlags =
fbBuilder.writeListBool(_usedNameIsQualifiedFlags);
}
if (!(_usedNameKinds == null || _usedNameKinds.isEmpty)) {
offset_usedNameKinds =
fbBuilder.writeListUint8(_usedNameKinds.map((b) => b.index).toList());
}
if (!(_usedNameOffsets == null || _usedNameOffsets.isEmpty)) {
offset_usedNameOffsets = fbBuilder.writeListUint32(_usedNameOffsets);
}
if (!(_usedNames == null || _usedNames.isEmpty)) {
offset_usedNames = fbBuilder.writeListUint32(_usedNames);
}
fbBuilder.startTable();
if (offset_elementKinds != null) {
fbBuilder.addOffset(4, offset_elementKinds);
}
if (offset_elementNameClassMemberIds != null) {
fbBuilder.addOffset(7, offset_elementNameClassMemberIds);
}
if (offset_elementNameParameterIds != null) {
fbBuilder.addOffset(8, offset_elementNameParameterIds);
}
if (offset_elementNameUnitMemberIds != null) {
fbBuilder.addOffset(6, offset_elementNameUnitMemberIds);
}
if (offset_elementUnits != null) {
fbBuilder.addOffset(5, offset_elementUnits);
}
if (_nullStringId != null && _nullStringId != 0) {
fbBuilder.addUint32(1, _nullStringId);
}
if (offset_strings != null) {
fbBuilder.addOffset(0, offset_strings);
}
if (offset_subtypes != null) {
fbBuilder.addOffset(19, offset_subtypes);
}
if (offset_supertypes != null) {
fbBuilder.addOffset(18, offset_supertypes);
}
if (offset_unitLibraryUris != null) {
fbBuilder.addOffset(2, offset_unitLibraryUris);
}
if (offset_unitUnitUris != null) {
fbBuilder.addOffset(3, offset_unitUnitUris);
}
if (offset_usedElementIsQualifiedFlags != null) {
fbBuilder.addOffset(13, offset_usedElementIsQualifiedFlags);
}
if (offset_usedElementKinds != null) {
fbBuilder.addOffset(10, offset_usedElementKinds);
}
if (offset_usedElementLengths != null) {
fbBuilder.addOffset(12, offset_usedElementLengths);
}
if (offset_usedElementOffsets != null) {
fbBuilder.addOffset(11, offset_usedElementOffsets);
}
if (offset_usedElements != null) {
fbBuilder.addOffset(9, offset_usedElements);
}
if (offset_usedNameIsQualifiedFlags != null) {
fbBuilder.addOffset(17, offset_usedNameIsQualifiedFlags);
}
if (offset_usedNameKinds != null) {
fbBuilder.addOffset(15, offset_usedNameKinds);
}
if (offset_usedNameOffsets != null) {
fbBuilder.addOffset(16, offset_usedNameOffsets);
}
if (offset_usedNames != null) {
fbBuilder.addOffset(14, offset_usedNames);
}
return fbBuilder.endTable();
}
}
idl.AnalysisDriverUnitIndex readAnalysisDriverUnitIndex(List<int> buffer) {
fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer);
return const _AnalysisDriverUnitIndexReader().read(rootRef, 0);
}
class _AnalysisDriverUnitIndexReader
extends fb.TableReader<_AnalysisDriverUnitIndexImpl> {
const _AnalysisDriverUnitIndexReader();
@override
_AnalysisDriverUnitIndexImpl createObject(fb.BufferContext bc, int offset) =>
new _AnalysisDriverUnitIndexImpl(bc, offset);
}
class _AnalysisDriverUnitIndexImpl extends Object
with _AnalysisDriverUnitIndexMixin
implements idl.AnalysisDriverUnitIndex {
final fb.BufferContext _bc;
final int _bcOffset;
_AnalysisDriverUnitIndexImpl(this._bc, this._bcOffset);
List<idl.IndexSyntheticElementKind> _elementKinds;
List<int> _elementNameClassMemberIds;
List<int> _elementNameParameterIds;
List<int> _elementNameUnitMemberIds;
List<int> _elementUnits;
int _nullStringId;
List<String> _strings;
List<idl.AnalysisDriverSubtype> _subtypes;
List<int> _supertypes;
List<int> _unitLibraryUris;
List<int> _unitUnitUris;
List<bool> _usedElementIsQualifiedFlags;
List<idl.IndexRelationKind> _usedElementKinds;
List<int> _usedElementLengths;
List<int> _usedElementOffsets;
List<int> _usedElements;
List<bool> _usedNameIsQualifiedFlags;
List<idl.IndexRelationKind> _usedNameKinds;
List<int> _usedNameOffsets;
List<int> _usedNames;
@override
List<idl.IndexSyntheticElementKind> get elementKinds {
_elementKinds ??= const fb.ListReader<idl.IndexSyntheticElementKind>(
const _IndexSyntheticElementKindReader())
.vTableGet(_bc, _bcOffset, 4, const <idl.IndexSyntheticElementKind>[]);
return _elementKinds;
}
@override
List<int> get elementNameClassMemberIds {
_elementNameClassMemberIds ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 7, const <int>[]);
return _elementNameClassMemberIds;
}
@override
List<int> get elementNameParameterIds {
_elementNameParameterIds ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 8, const <int>[]);
return _elementNameParameterIds;
}
@override
List<int> get elementNameUnitMemberIds {
_elementNameUnitMemberIds ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 6, const <int>[]);
return _elementNameUnitMemberIds;
}
@override
List<int> get elementUnits {
_elementUnits ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, const <int>[]);
return _elementUnits;
}
@override
int get nullStringId {
_nullStringId ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 1, 0);
return _nullStringId;
}
@override
List<String> get strings {
_strings ??= const fb.ListReader<String>(const fb.StringReader())
.vTableGet(_bc, _bcOffset, 0, const <String>[]);
return _strings;
}
@override
List<idl.AnalysisDriverSubtype> get subtypes {
_subtypes ??= const fb.ListReader<idl.AnalysisDriverSubtype>(
const _AnalysisDriverSubtypeReader())
.vTableGet(_bc, _bcOffset, 19, const <idl.AnalysisDriverSubtype>[]);
return _subtypes;
}
@override
List<int> get supertypes {
_supertypes ??= const fb.Uint32ListReader()
.vTableGet(_bc, _bcOffset, 18, const <int>[]);
return _supertypes;
}
@override
List<int> get unitLibraryUris {
_unitLibraryUris ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, const <int>[]);
return _unitLibraryUris;
}
@override
List<int> get unitUnitUris {
_unitUnitUris ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, const <int>[]);
return _unitUnitUris;
}
@override
List<bool> get usedElementIsQualifiedFlags {
_usedElementIsQualifiedFlags ??=
const fb.BoolListReader().vTableGet(_bc, _bcOffset, 13, const <bool>[]);
return _usedElementIsQualifiedFlags;
}
@override
List<idl.IndexRelationKind> get usedElementKinds {
_usedElementKinds ??= const fb.ListReader<idl.IndexRelationKind>(
const _IndexRelationKindReader())
.vTableGet(_bc, _bcOffset, 10, const <idl.IndexRelationKind>[]);
return _usedElementKinds;
}
@override
List<int> get usedElementLengths {
_usedElementLengths ??= const fb.Uint32ListReader()
.vTableGet(_bc, _bcOffset, 12, const <int>[]);
return _usedElementLengths;
}
@override
List<int> get usedElementOffsets {
_usedElementOffsets ??= const fb.Uint32ListReader()
.vTableGet(_bc, _bcOffset, 11, const <int>[]);
return _usedElementOffsets;
}
@override
List<int> get usedElements {
_usedElements ??=
const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 9, const <int>[]);
return _usedElements;
}
@override
List<bool> get usedNameIsQualifiedFlags {
_usedNameIsQualifiedFlags ??=
const fb.BoolListReader().vTableGet(_bc, _bcOffset, 17, const <bool>[]);
return _usedNameIsQualifiedFlags;
}
@override
List<idl.IndexRelationKind> get usedNameKinds {
_usedNameKinds ??= const fb.ListReader<idl.IndexRelationKind>(
const _IndexRelationKindReader())
.vTableGet(_bc, _bcOffset, 15, const <idl.IndexRelationKind>[]);
return _usedNameKinds;
}
@override
List<int> get usedNameOffsets {
_usedNameOffsets ??= const fb.Uint32ListReader()
.vTableGet(_bc, _bcOffset, 16, const <int>[]);
return _usedNameOffsets;
}
@override
List<int> get usedNames {
_usedNames ??= const fb.Uint32ListReader()
.vTableGet(_bc, _bcOffset, 14, const <int>[]);
return _usedNames;
}
}
abstract class _AnalysisDriverUnitIndexMixin
implements idl.AnalysisDriverUnitIndex {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (elementKinds.isNotEmpty)
_result["elementKinds"] = elementKinds
.map((_value) => _value.toString().split('.')[1])
.toList();
if (elementNameClassMemberIds.isNotEmpty)
_result["elementNameClassMemberIds"] = elementNameClassMemberIds;
if (elementNameParameterIds.isNotEmpty)
_result["elementNameParameterIds"] = elementNameParameterIds;
if (elementNameUnitMemberIds.isNotEmpty)
_result["elementNameUnitMemberIds"] = elementNameUnitMemberIds;
if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits;
if (nullStringId != 0) _result["nullStringId"] = nullStringId;
if (strings.isNotEmpty) _result["strings"] = strings;
if (subtypes.isNotEmpty)
_result["subtypes"] = subtypes.map((_value) => _value.toJson()).toList();
if (supertypes.isNotEmpty) _result["supertypes"] = supertypes;
if (unitLibraryUris.isNotEmpty)
_result["unitLibraryUris"] = unitLibraryUris;
if (unitUnitUris.isNotEmpty) _result["unitUnitUris"] = unitUnitUris;
if (usedElementIsQualifiedFlags.isNotEmpty)
_result["usedElementIsQualifiedFlags"] = usedElementIsQualifiedFlags;
if (usedElementKinds.isNotEmpty)
_result["usedElementKinds"] = usedElementKinds
.map((_value) => _value.toString().split('.')[1])
.toList();
if (usedElementLengths.isNotEmpty)
_result["usedElementLengths"] = usedElementLengths;
if (usedElementOffsets.isNotEmpty)
_result["usedElementOffsets"] = usedElementOffsets;
if (usedElements.isNotEmpty) _result["usedElements"] = usedElements;
if (usedNameIsQualifiedFlags.isNotEmpty)
_result["usedNameIsQualifiedFlags"] = usedNameIsQualifiedFlags;
if (usedNameKinds.isNotEmpty)
_result["usedNameKinds"] = usedNameKinds
.map((_value) => _value.toString().split('.')[1])
.toList();
if (usedNameOffsets.isNotEmpty)
_result["usedNameOffsets"] = usedNameOffsets;
if (usedNames.isNotEmpty) _result["usedNames"] = usedNames;
return _result;
}
@override
Map<String, Object> toMap() => {
"elementKinds": elementKinds,
"elementNameClassMemberIds": elementNameClassMemberIds,
"elementNameParameterIds": elementNameParameterIds,
"elementNameUnitMemberIds": elementNameUnitMemberIds,
"elementUnits": elementUnits,
"nullStringId": nullStringId,
"strings": strings,
"subtypes": subtypes,
"supertypes": supertypes,
"unitLibraryUris": unitLibraryUris,
"unitUnitUris": unitUnitUris,
"usedElementIsQualifiedFlags": usedElementIsQualifiedFlags,
"usedElementKinds": usedElementKinds,
"usedElementLengths": usedElementLengths,
"usedElementOffsets": usedElementOffsets,
"usedElements": usedElements,
"usedNameIsQualifiedFlags": usedNameIsQualifiedFlags,
"usedNameKinds": usedNameKinds,
"usedNameOffsets": usedNameOffsets,
"usedNames": usedNames,
};
@override
String toString() => convert.json.encode(toJson());
}
class AnalysisDriverUnlinkedUnitBuilder extends Object
with _AnalysisDriverUnlinkedUnitMixin
implements idl.AnalysisDriverUnlinkedUnit {
List<String> _definedClassMemberNames;
List<String> _definedTopLevelNames;
List<String> _referencedNames;
List<String> _subtypedNames;
UnlinkedUnitBuilder _unit;
UnlinkedUnit2Builder _unit2;
@override
List<String> get definedClassMemberNames =>
_definedClassMemberNames ??= <String>[];
/// List of class member names defined by the unit.
set definedClassMemberNames(List<String> value) {
this._definedClassMemberNames = value;
}
@override
List<String> get definedTopLevelNames => _definedTopLevelNames ??= <String>[];
/// List of top-level names defined by the unit.
set definedTopLevelNames(List<String> value) {
this._definedTopLevelNames = value;
}
@override
List<String> get referencedNames => _referencedNames ??= <String>[];
/// List of external names referenced by the unit.
set referencedNames(List<String> value) {
this._referencedNames = value;
}
@override
List<String> get subtypedNames => _subtypedNames ??= <String>[];
/// List of names which are used in `extends`, `with` or `implements` clauses
/// in the file. Import prefixes and type arguments are not included.
set subtypedNames(List<String> value) {
this._subtypedNames = value;
}
@override
UnlinkedUnitBuilder get unit => _unit;
/// Unlinked information for the unit.
set unit(UnlinkedUnitBuilder value) {
this._unit = value;
}
@override
UnlinkedUnit2Builder get unit2 => _unit2;
/// Unlinked information for the unit.
set unit2(UnlinkedUnit2Builder value) {
this._unit2 = value;
}
AnalysisDriverUnlinkedUnitBuilder(
{List<String> definedClassMemberNames,
List<String> definedTopLevelNames,
List<String> referencedNames,
List<String> subtypedNames,
UnlinkedUnitBuilder unit,
UnlinkedUnit2Builder unit2})
: _definedClassMemberNames = definedClassMemberNames,
_definedTopLevelNames = definedTopLevelNames,
_referencedNames = referencedNames,
_subtypedNames = subtypedNames,
_unit = unit,
_unit2 = unit2;
/// Flush [informative] data recursively.
void flushInformative() {
_unit?.flushInformative();
_unit2?.flushInformative();
}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
if (this._referencedNames == null) {
signature.addInt(0);
} else {
signature.addInt(this._referencedNames.length);
for (var x in this._referencedNames) {
signature.addString(x);
}
}
signature.addBool(this._unit != null);
this._unit?.collectApiSignature(signature);
if (this._definedTopLevelNames == null) {
signature.addInt(0);
} else {
signature.addInt(this._definedTopLevelNames.length);
for (var x in this._definedTopLevelNames) {
signature.addString(x);
}
}
if (this._definedClassMemberNames == null) {
signature.addInt(0);
} else {
signature.addInt(this._definedClassMemberNames.length);
for (var x in this._definedClassMemberNames) {
signature.addString(x);
}
}
if (this._subtypedNames == null) {
signature.addInt(0);
} else {
signature.addInt(this._subtypedNames.length);
for (var x in this._subtypedNames) {
signature.addString(x);
}
}
signature.addBool(this._unit2 != null);
this._unit2?.collectApiSignature(signature);
}
List<int> toBuffer() {
fb.Builder fbBuilder = new fb.Builder();
return fbBuilder.finish(finish(fbBuilder), "ADUU");
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_definedClassMemberNames;
fb.Offset offset_definedTopLevelNames;
fb.Offset offset_referencedNames;
fb.Offset offset_subtypedNames;
fb.Offset offset_unit;
fb.Offset offset_unit2;
if (!(_definedClassMemberNames == null ||
_definedClassMemberNames.isEmpty)) {
offset_definedClassMemberNames = fbBuilder.writeList(
_definedClassMemberNames
.map((b) => fbBuilder.writeString(b))
.toList());
}
if (!(_definedTopLevelNames == null || _definedTopLevelNames.isEmpty)) {
offset_definedTopLevelNames = fbBuilder.writeList(
_definedTopLevelNames.map((b) => fbBuilder.writeString(b)).toList());
}
if (!(_referencedNames == null || _referencedNames.isEmpty)) {
offset_referencedNames = fbBuilder.writeList(
_referencedNames.map((b) => fbBuilder.writeString(b)).toList());
}
if (!(_subtypedNames == null || _subtypedNames.isEmpty)) {
offset_subtypedNames = fbBuilder.writeList(
_subtypedNames.map((b) => fbBuilder.writeString(b)).toList());
}
if (_unit != null) {
offset_unit = _unit.finish(fbBuilder);
}
if (_unit2 != null) {
offset_unit2 = _unit2.finish(fbBuilder);
}
fbBuilder.startTable();
if (offset_definedClassMemberNames != null) {
fbBuilder.addOffset(3, offset_definedClassMemberNames);
}
if (offset_definedTopLevelNames != null) {
fbBuilder.addOffset(2, offset_definedTopLevelNames);
}
if (offset_referencedNames != null) {
fbBuilder.addOffset(0, offset_referencedNames);
}
if (offset_subtypedNames != null) {
fbBuilder.addOffset(4, offset_subtypedNames);
}
if (offset_unit != null) {
fbBuilder.addOffset(1, offset_unit);
}
if (offset_unit2 != null) {
fbBuilder.addOffset(5, offset_unit2);
}
return fbBuilder.endTable();
}
}
idl.AnalysisDriverUnlinkedUnit readAnalysisDriverUnlinkedUnit(
List<int> buffer) {
fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer);
return const _AnalysisDriverUnlinkedUnitReader().read(rootRef, 0);
}
class _AnalysisDriverUnlinkedUnitReader
extends fb.TableReader<_AnalysisDriverUnlinkedUnitImpl> {
const _AnalysisDriverUnlinkedUnitReader();
@override
_AnalysisDriverUnlinkedUnitImpl createObject(
fb.BufferContext bc, int offset) =>
new _AnalysisDriverUnlinkedUnitImpl(bc, offset);
}
class _AnalysisDriverUnlinkedUnitImpl extends Object
with _AnalysisDriverUnlinkedUnitMixin
implements idl.AnalysisDriverUnlinkedUnit {
final fb.BufferContext _bc;
final int _bcOffset;
_AnalysisDriverUnlinkedUnitImpl(this._bc, this._bcOffset);
List<String> _definedClassMemberNames;
List<String> _definedTopLevelNames;
List<String> _referencedNames;
List<String> _subtypedNames;
idl.UnlinkedUnit _unit;
idl.UnlinkedUnit2 _unit2;
@override
List<String> get definedClassMemberNames {
_definedClassMemberNames ??=
const fb.ListReader<String>(const fb.StringReader())
.vTableGet(_bc, _bcOffset, 3, const <String>[]);
return _definedClassMemberNames;
}
@override
List<String> get definedTopLevelNames {
_definedTopLevelNames ??=
const fb.ListReader<String>(const fb.StringReader())
.vTableGet(_bc, _bcOffset, 2, const <String>[]);
return _definedTopLevelNames;
}
@override
List<String> get referencedNames {
_referencedNames ??= const fb.ListReader<String>(const fb.StringReader())
.vTableGet(_bc, _bcOffset, 0, const <String>[]);
return _referencedNames;
}
@override
List<String> get subtypedNames {
_subtypedNames ??= const fb.ListReader<String>(const fb.StringReader())
.vTableGet(_bc, _bcOffset, 4, const <String>[]);
return _subtypedNames;
}
@override
idl.UnlinkedUnit get unit {
_unit ??= const _UnlinkedUnitReader().vTableGet(_bc, _bcOffset, 1, null);
return _unit;
}
@override
idl.UnlinkedUnit2 get unit2 {
_unit2 ??= const _UnlinkedUnit2Reader().vTableGet(_bc, _bcOffset, 5, null);
return _unit2;
}
}
abstract class _AnalysisDriverUnlinkedUnitMixin
implements idl.AnalysisDriverUnlinkedUnit {
@override
Map<String, Object> toJson() {
Map<String, Object> _result = <String, Object>{};
if (definedClassMemberNames.isNotEmpty)
_result["definedClassMemberNames"] = definedClassMemberNames;
if (definedTopLevelNames.isNotEmpty)
_result["definedTopLevelNames"] = definedTopLevelNames;
if (referencedNames.isNotEmpty)
_result["referencedNames"] = referencedNames;
if (subtypedNames.isNotEmpty) _result["subtypedNames"] = subtypedNames;
if (unit != null) _result["unit"] = unit.toJson();
if (unit2 != null) _result["unit2"] = unit2.toJson();
return _result;
}
@override
Map<String, Object> toMap() => {
"definedClassMemberNames": definedClassMemberNames,
"definedTopLevelNames": definedTopLevelNames,
"referencedNames": referencedNames,
"subtypedNames": subtypedNames,
"unit": unit,
"unit2": unit2,
};
@override
String toString() => convert.json.encode(toJson());
}
class AvailableDeclarationBuilder extends Object
with _AvailableDeclarationMixin
implements idl.AvailableDeclaration {
List<AvailableDeclarationBuilder> _children;
String _defaultArgumentListString;
List<int> _defaultArgumentListTextRanges;
String _docComplete;
String _docSummary;
int _fieldMask;
bool _isAbstract;
bool _isConst;
bool _isDeprecated;
bool _isFinal;
idl.AvailableDeclarationKind _kind;
int _locationOffset;
int _locationStartColumn;
int _locationStartLine;
String _name;
List<String> _parameterNames;
String _parameters;
List<String> _parameterTypes;
List<String> _relevanceTags;
int _requiredParameterCount;
String _returnType;
String _typeParameters;
@override
List<AvailableDeclarationBuilder> get children =>
_children ??= <AvailableDeclarationBuilder>[];
set children(List<AvailableDeclarationBuilder> value) {
this._children = value;
}
@override
String get defaultArgumentListString => _defaultArgumentListString ??= '';
set defaultArgumentListString(String value) {
this._defaultArgumentListString = value;
}
@override
List<int> get defaultArgumentListTextRanges =>
_defaultArgumentListTextRanges ??= <int>[];
set defaultArgumentListTextRanges(List<int> value) {
assert(value == null || value.every((e) => e >= 0));
this._defaultArgumentListTextRanges = value;
}
@override
String get docComplete => _docComplete ??= '';
set docComplete(String value) {
this._docComplete = value;
}
@override
String get docSummary => _docSummary ??= '';
set docSummary(String value) {
this._docSummary = value;
}
@override
int get fieldMask => _fieldMask ??= 0;
set fieldMask(int value) {
assert(value == null || value >= 0);
this._fieldMask = value;
}
@override
bool get isAbstract => _isAbstract ??= false;
set isAbstract(bool value) {
this._isAbstract = value;
}
@override
bool get isConst => _isConst ??= false;
set isConst(bool value) {
this._isConst = value;
}
@override
bool get isDeprecated => _isDeprecated ??= false;
set isDeprecated(bool value) {
this._isDeprecated = value;
}
@override
bool get isFinal => _isFinal ??= false;
set isFinal(bool value) {
this._isFinal = value;
}
@override
idl.AvailableDeclarationKind get kind =>
_kind ??= idl.AvailableDeclarationKind.CLASS;
/// The kind of the declaration.
set kind(idl.AvailableDeclarationKind value) {
this._kind = value;
}
@override
int get locationOffset => _locationOffset ??= 0;
set locationOffset(int value) {
assert(value == null || value >= 0);
this._locationOffset = value;
}
@override
int get locationStartColumn => _locationStartColumn ??= 0;
set locationStartColumn(int value) {
assert(value == null || value >= 0);
this._locationStartColumn = value;
}
@override
int get locationStartLine => _locationStartLine ??= 0;
set locationStartLine(int value) {
assert(value == null || value >= 0);
this._locationStartLine = value;
}
@override
String get name => _name ??= '';
/// The first part of the declaration name, usually the only one, for example
/// the name of a class like `MyClass`, or a function like `myFunction`.
set name(String value) {
this._name = value;
}
@override
List<String> get parameterNames => _parameterNames ??= <String>[];
set parameterNames(List<String> value) {
this._parameterNames = value;
}
@override
String get parameters => _parameters ??= '';
set parameters(String value) {
this._parameters = value;
}
@override
List<String> get parameterTypes => _parameterTypes ??= <String>[];
set parameterTypes(List<String> value) {
this._parameterTypes = value;
}
@override
List<String> get relevanceTags => _relevanceTags ??= <String>[];
/// The partial list of relevance tags. Not every declaration has one (for
/// example, function do not currently), and not every declaration has to
/// store one (for classes it can be computed when we know the library that
/// includes this file).
set relevanceTags(List<String> value) {
this._relevanceTags = value;
}
@override
int get requiredParameterCount => _requiredParameterCount ??= 0;
set requiredParameterCount(int value) {
assert(value == null || value >= 0);
this._requiredParameterCount = value;
}
@override
String get returnType => _returnType ??= '';
set returnType(String value) {
this._returnType = value;
}
@override
String get typeParameters => _typeParameters ??= '';
set typeParameters(String value) {
this._typeParameters = value;
}
AvailableDeclarationBuilder(
{List<AvailableDeclarationBuilder> children,
String defaultArgumentListString,
List<int> defaultArgumentListTextRanges,
String docComplete,
String docSummary,
int fieldMask,
bool isAbstract,
bool isConst,
bool isDeprecated,
bool isFinal,
idl.AvailableDeclarationKind kind,
int locationOffset,
int locationStartColumn,
int locationStartLine,
String name,
List<String> parameterNames,
String parameters,
List<String> parameterTypes,
List<String> relevanceTags,
int requiredParameterCount,
String returnType,
String typeParameters})
: _children = children,
_defaultArgumentListString = defaultArgumentListString,
_defaultArgumentListTextRanges = defaultArgumentListTextRanges,
_docComplete = docComplete,
_docSummary = docSummary,
_fieldMask = fieldMask,
_isAbstract = isAbstract,
_isConst = isConst,
_isDeprecated = isDeprecated,
_isFinal = isFinal,
_kind = kind,
_locationOffset = locationOffset,
_locationStartColumn = locationStartColumn,
_locationStartLine = locationStartLine,
_name = name,
_parameterNames = parameterNames,
_parameters = parameters,
_parameterTypes = parameterTypes,
_relevanceTags = relevanceTags,
_requiredParameterCount = requiredParameterCount,
_returnType = returnType,
_typeParameters = typeParameters;
/// Flush [informative] data recursively.
void flushInformative() {
_children?.forEach((b) => b.flushInformative());
}
/// Accumulate non-[informative] data into [signature].
void collectApiSignature(api_sig.ApiSignature signature) {
if (this._children == null) {
signature.addInt(0);
} else {
signature.addInt(this._children.length);
for (var x in this._children) {
x?.collectApiSignature(signature);
}
}
signature.addString(this._defaultArgumentListString ?? '');
if (this._defaultArgumentListTextRanges == null) {
signature.addInt(0);
} else {
signature.addInt(this._defaultArgumentListTextRanges.length);
for (var x in this._defaultArgumentListTextRanges) {
signature.addInt(x);
}
}
signature.addString(this._docComplete ?? '');
signature.addString(this._docSummary ?? '');
signature.addInt(this._fieldMask ?? 0);
signature.addBool(this._isAbstract == true);
signature.addBool(this._isConst == true);
signature.addBool(this._isDeprecated == true);
signature.addBool(this._isFinal == true);
signature.addInt(this._kind == null ? 0 : this._kind.index);
signature.addInt(this._locationOffset ?? 0);
signature.addInt(this._locationStartColumn ?? 0);
signature.addInt(this._locationStartLine ?? 0);
signature.addString(this._name ?? '');
if (this._parameterNames == null) {
signature.addInt(0);
} else {
signature.addInt(this._parameterNames.length);
for (var x in this._parameterNames) {
signature.addString(x);
}
}
signature.addString(this._parameters ?? '');
if (this._parameterTypes == null) {
signature.addInt(0);
} else {
signature.addInt(this._parameterTypes.length);
for (var x in this._parameterTypes) {
signature.addString(x);
}
}
if (this._relevanceTags == null) {
signature.addInt(0);
} else {
signature.addInt(this._relevanceTags.length);
for (var x in this._relevanceTags) {
signature.addString(x);
}
}
signature.addInt(this._requiredParameterCount ?? 0);
signature.addString(this._returnType ?? '');
signature.addString(this._typeParameters ?? '');
}
fb.Offset finish(fb.Builder fbBuilder) {
fb.Offset offset_children;
fb.Offset offset_defaultArgumentListString;
fb.Offset offset_defaultArgumentListTextRanges;
fb.Offset offset_docComplete;
fb.Offset offset_docSummary;
fb.Offset offset_name;
fb.Offset offset_parameterNames;
fb.Offset offset_parameters;
fb.Offset offset_parameterTypes;
fb.Offset offset_relevanceTags;
fb.Offset offset_returnType;
fb.Offset offset_typeParameters;
if (!(_children == null || _children.isEmpty)) {
offset_children = fbBuilder
.writeList(_children.map((b) => b.finish(fbBuilder)).toList());
}
if (_defaultArgumentListString != null) {
offset_defaultArgumentListString =
fbBuilder.writeString(_defaultArgumentListString);
}
if (!(_defaultArgumentListTextRanges == null ||
_defaultArgumentListTextRanges.isEmpty)) {
offset_defaultArgumentListTextRanges =
fbBuilder.writeListUint32(_defaultArgumentListTextRanges);
}
if (_docComplete != null) {
offset_docComplete = fbBuilder.writeString(_docComplete);
}
if (_docSummary != null) {
offset_docSummary = fbBuilder.writeString(_docSummary);
}
if (_name != null) {
offset_name = fbBuilder.writeString(_name);
}
if (!(_parameterNames == null || _parameterNames.isEmpty)) {
offset_parameterNames = fbBuilder.writeList(
_parameterNames.map((b) => fbBuilder.writeString(b)).toList());
}
if (_parameters != null) {
offset_parameters = fbBuilder.writeString(_parameters);
}
if (!(_parameterTypes == null || _parameterTypes.isEmpty)) {
offset_parameterTypes = fbBuilder.writeList(
_parameterTypes.map((b) => fbBuilder.writeString(b)).toList());
}
if (!(_relevanceTags == null || _relevanceTags.isEmpty)) {
offset_relevanceTags = fbBuilder.writeList(
_relevanceTags.map((b) => fbBuilder.writeString(b)).toList());
}
if (_returnType != null) {
offset_returnType = fbBuilder.writeString(_returnType);
}
if (_typeParameters != null) {
offset_typeParameters = fbBuilder.writeString(_typeParameters);
}
fbBuilder.startTable();
if (offset_children != null) {
fbBuilder.addOffset(0, offset_children);
}
if (offset_defaultArgumentListString != null) {
fbBuilder.addOffset(1, offset_defaultArgumentListString);
}
if (offset_defaultArgumentListTextRanges != null) {
fbBuilder.addOffset(2, offset_defaultArgumentListTextRanges);
}
if (offset_docComplete !=