registerBridges static method
Registers all bridges with an interpreter.
importPath is the package import path that D4rt scripts will use
to access these classes (e.g., 'package:tom_build/tom.dart').
Implementation
static void registerBridges(D4rt interpreter, String importPath) {
// Register bridged classes with source URIs for deduplication
final classes = bridgeClasses();
final classSources = classSourceUris();
for (final bridge in classes) {
interpreter.registerBridgedClass(bridge, importPath, sourceUri: classSources[bridge.name]);
}
// Register bridged enums with source URIs for deduplication
final enums = bridgedEnums();
final enumSources = enumSourceUris();
for (final enumDef in enums) {
interpreter.registerBridgedEnum(enumDef, importPath, sourceUri: enumSources[enumDef.name]);
}
// Register global variables
registerGlobalVariables(interpreter, importPath);
// Register function typedefs for type resolution
final typedefs = functionTypedefs();
for (final name in typedefs) {
interpreter.registerFunctionTypedef(name, importPath);
}
}