BridgeConfig class

Complete bridge configuration for a project.

Constructors

BridgeConfig({required String name, required List<ModuleConfig> modules, String? helpersImport, String? d4rtImport, bool generateBarrel = true, String? barrelPath, bool generateDartscript = true, String? dartscriptPath, String? registrationClass, String? libraryPath, bool generateTestRunner = false, String? testRunnerPath, List<ImportedBridgeConfig> importedBridges = const [], List<String> recursiveBoundTypes = const [], bool generateProxies = false, String? proxiesOutputPath, List<ProxyClassConfig> proxyClasses = const [], String relaxerOutputPath = 'lib/src/relaxers.b.dart', List<String> priorRelaxerModules = const [], bool generateAllRelaxers = true, List<RelaxerClassConfig> relaxerClasses = const [], List<String> additionalRelaxerTypes = const [], List<RecreatorClassConfig> recreatorClasses = const [], List<GenericInterceptorConfig> genericInterceptors = const [], List<GenericConstructorConfig> genericConstructors = const [], bool yieldVoidCallbacks = false, Map<String, String> typeMappings = const {}, List<String> additionalImports = const []})
const
BridgeConfig.fromJson(Map<String, dynamic> json)
factory

Properties

additionalImports List<String>
DGU3: Custom import directives added to every generated bridge file.
final
additionalRelaxerTypes List<String>
Extra type names to keep as eligible relaxer/RC-2 type-args when generateAllRelaxers is false.
final
barrelPath String?
final
d4rtImport String?
Import path for the core D4rt runtime package.
final
dartscriptPath String?
final
generateAllRelaxers bool
Whether to generate the full combinatorial relaxer/RC-2 surface.
final
generateBarrel bool
final
generateDartscript bool
final
generateProxies bool
Whether to generate proxy/adapter classes for abstract delegates.
final
generateTestRunner bool
Whether to generate a test runner script (d4rtrun.b.dart).
final
genericConstructors List<GenericConstructorConfig>
Templated RC-2 generic constructor factories, one per GenericConstructorConfig.
final
genericInterceptors List<GenericInterceptorConfig>
Generic re-dispatch interceptors templated from GenericInterceptorConfig.
final
hashCode int
The hash code for this object.
no setterinherited
helpersImport String?
final
importedBridges List<ImportedBridgeConfig>
List of external bridge packages to import and register.
final
libraryPath String?
Central directory path for per-package bridge files.
final
modules List<ModuleConfig>
final
name String
final
priorRelaxerModules List<String>
Package names whose relaxer modules should be imported and re-used.
final
proxiesOutputPath String?
Output path for the generated proxies file.
final
proxyClasses List<ProxyClassConfig>
List of abstract classes to generate proxy/adapter subclasses for.
final
recreatorClasses List<RecreatorClassConfig>
Single-type-parameter widgets to emit D4.registerGenericTypeWrapper re-creators for.
final
recursiveBoundTypes List<String>
Additional types to include in recursive bound dispatch.
final
registrationClass String?
final
relaxerClasses List<RelaxerClassConfig>
Extra classes to keep as eligible relaxer/RC-2 type-args when generateAllRelaxers is false.
final
relaxerOutputPath String
Output path for the generated GEN-079 relaxer wrapper file.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
testRunnerPath String?
Output path for the generated test runner script.
final
typeMappings Map<String, String>
DGU3: Escape hatch mapping an awkward source type to a substitute that is emitted verbatim in generated code — the config seam that upholds the "fix the generator, not the generated code" rule.
final
yieldVoidCallbacks bool
B.14: wrap every void bridged callback in an async closure that yields 1 ms (await Future.delayed(const Duration(milliseconds: 1))) after invoking the interpreted callback.
final

Methods

copyWith({String? name, List<ModuleConfig>? modules, String? helpersImport, String? d4rtImport, bool? generateBarrel, String? barrelPath, bool? generateDartscript, String? dartscriptPath, String? registrationClass, String? libraryPath, bool? generateTestRunner, String? testRunnerPath, List<ImportedBridgeConfig>? importedBridges, List<String>? recursiveBoundTypes, bool? generateProxies, String? proxiesOutputPath, List<ProxyClassConfig>? proxyClasses, String? relaxerOutputPath, List<String>? priorRelaxerModules, bool? generateAllRelaxers, List<RelaxerClassConfig>? relaxerClasses, List<String>? additionalRelaxerTypes, List<RecreatorClassConfig>? recreatorClasses, List<GenericInterceptorConfig>? genericInterceptors, List<GenericConstructorConfig>? genericConstructors, bool? yieldVoidCallbacks, Map<String, String>? typeMappings, List<String>? additionalImports}) BridgeConfig
Creates a copy of this config with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

findConfigFiles(String directory, {bool recursive = false}) List<String>
Find all d4rt_bridging.json files in a directory.
fromFile(String filePath) BridgeConfig
Load configuration from a JSON file.