LibraryClass class
Wrapper class for library-scoped bridged classes.
Step #17 (import-optimization): the wrapped BridgedClass is built lazily
via a deferred thunk and memoized on first access to bridgedClass.
name / nativeType are stored up front so registration, lookup filtering
and warm-parent seeding never force the heavy build. Mirror of
tom_d4rt's LibraryClass.
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?
-
final
- thunk → BridgedClass Function()
-
A deferred thunk resolving (and memoizing) bridgedClass on call.
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