writeExportedType method
ExportedTypeIndex
writeExportedType({
- required TypeDefIndex typeDefId,
- required String name,
- required Implementation implementation,
- String? namespace,
- TypeAttributes flags = const TypeAttributes(0),
Writes an ExportedType
row, returning the corresponding index.
Implementation
ExportedTypeIndex writeExportedType({
required TypeDefIndex typeDefId,
required String name,
required Implementation implementation,
String? namespace,
TypeAttributes flags = const TypeAttributes(0),
}) {
final table = _tableStream[MetadataTableId.exportedType];
final index = ExportedTypeIndex(table.length);
table.add(
ExportedType(
flags: flags,
typeDefId: typeDefId,
typeName: _stringHeap.insert(name),
typeNamespace: namespace == null
? const StringIndex(0)
: _stringHeap.insert(namespace),
implementation: implementation,
),
);
return index;
}