LibraryClass class
Wrapper class for library-scoped bridged classes. Stores a bridged class with its canonical source URI for deduplication.
Step #17 (import-optimization): the wrapped BridgedClass is built lazily
via a deferred thunk and memoized on first access to bridgedClass. The
name and nativeType are stored up front so registration / lookup
filtering / warm-parent type seeding can run without forcing the heavy
member-map + adapter-closure build. The eager constructor wraps an
already-built class as a trivial () => obj thunk (behaviour unchanged).
Constructors
- LibraryClass(BridgedClass bridgedClass, {String? sourceUri})
-
Eager wrapper:
bridgedClassis already built. - LibraryClass.lazy(String name, Type nativeType, BridgedClass _thunk(), {String? sourceUri})
- Lazy wrapper: thunk builds the bridge on first access to bridgedClass.
Properties
- bridgedClass → BridgedClass
-
The bridged class, built (and memoized) on first access.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The class name — always available without building the bridge.
final
- nativeType → Type
-
The native Dart type the bridge wraps — available without building.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceUri → String?
-
The canonical source URI where this class is defined.
See LibraryVariable.sourceUri for details.
final
- thunk → BridgedClass Function()
-
A deferred thunk that resolves (and memoizes) bridgedClass on call —
lets callers forward laziness onward without building now (e.g.
module-loader / warm-parent transfers register
libClass.thunk).no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited