LibraryBridgeDefinition class
Bridges for a single source library.
Groups all bridged elements that originate from the same canonical library
(e.g., package:tom_crypto/src/rsa/helpers.dart). This allows the runtime
to identify that elements from the same source are identical, even when
accessed through different barrels.
Example:
// Elements from package:tom_crypto/src/rsa/helpers.dart
final libraryBridge = LibraryBridgeDefinition(
canonicalUri: 'package:tom_crypto/src/rsa/helpers.dart',
classes: {'RsaKeyHelper': rsaKeyHelperBridge},
functions: {'getRsaKeyPair': getRsaKeyPairFunc},
variables: {},
getters: {},
enums: {},
);
Constructors
-
LibraryBridgeDefinition({required String canonicalUri, Map<
String, BridgedClass> classes = const {}, Map<String, NativeFunction> functions = const {}, Map<String, LibraryVariable> variables = const {}, Map<String, LibraryGetter> getters = const {}, Map<String, BridgedEnumDefinition< enums = const {}})Enum> > -
Creates a new library bridge definition.
const
Properties
- canonicalUri → String
-
The canonical package URI for this library.
final
-
classes
→ Map<
String, BridgedClass> -
Bridged class definitions keyed by class name.
final
-
enums
→ Map<
String, BridgedEnumDefinition< Enum> > -
Bridged enum definitions keyed by enum name.
final
-
functions
→ Map<
String, NativeFunction> -
Native function implementations keyed by function name.
final
-
getters
→ Map<
String, LibraryGetter> -
Library getters keyed by getter name.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether this library has any bridged content.
no setter
- isNotEmpty → bool
-
Whether this library has any bridged content.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
variables
→ Map<
String, LibraryVariable> -
Library variables keyed by variable name.
final
Methods
-
merge(
LibraryBridgeDefinition other) → LibraryBridgeDefinition - Returns a new definition with additional elements merged in.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited