generateDescriptor method
Future<SubjectDescriptor>
generateDescriptor(
- SubjectGenContext<Element> context
)
Implementation
@override
Future<SubjectDescriptor> generateDescriptor(
SubjectGenContext<Element> context) async {
var libraries = getSerializableLibraries(context);
var resolvedTypeSets = await Future.wait(libraries.map((e) => getSerializedTypes(context.step, e)));
var allTypes = resolvedTypeSets.expand((e) => e).toSet();
log.info("Found ${allTypes.length} library serializable types in ${libraries.length} libraries");
var binding = context.defaultDescriptor();
binding.meta["converterNames"] =
allTypes.map((e) => "${e.name}Converter").toList();
return binding;
}