ScopeHandlerWeaverProxy class
Used as a proxy on weaver for generated scope handler classes. provides extra hidden functionality that is only and only required by scope-handlers.
- Implemented types
Constructors
- ScopeHandlerWeaverProxy(Weaver _realWeaver)
- Creates a proxy that delegates to the underlying Weaver and records registrations for unregisterDependenciesRegisteredByThisProxy.
Properties
- allowReassignment ↔ bool
-
Whether to allow reassigning registered dependencies and scope handlers.
getter/setter pairoverride
- allowScopesWithoutHandler ↔ bool
-
Whether to allow calling enterScope with a scope that has no registered
ScopeHandler.getter/setter pairoverride -
handlers
→ Iterable<
ScopeHandler> -
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keys
→ List<
DependencyKey> -
final
- named → WeaverNamed
-
Type-safe access to named dependencies generated by
weaver_builder.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ Iterable<
Scope> -
The currently active scopes in this Weaver instance.
no setteroverride
Methods
-
addObserver(
Function observer) → void -
addScopeHandler(
ScopeHandler handler) → Future< void> -
Adds a
ScopeHandlerto this Weaver instance.override -
clearSession(
String session) → void -
Removes all dependency objects registered under the given
sessionname.override -
enterScope(
Scope scope) → Future< void> -
Signals that the application has entered the given
scope.override -
get<
T extends Object> ({String? name}) → T -
Retrieves a registered dependency of type
T(and optionallyname).override -
getAsync<
T extends Object> ({String? name}) → Future< T> -
Asynchronously retrieves a registered dependency of type
T(and optionallyname).override -
isInScope(
String scopeName) → bool -
Returns true if the Weaver has entered the scope with the given
scopeName.override -
isRegistered<
T extends Object> ({Type? type, String? name}) → bool -
Returns true if a dependency of type
T(and optionallyname) is registered.override -
leaveScope(
String scopeName) → Future< void> -
Signals that the application has left the scope with the given
scopeName.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyObservers(
) → void -
register<
T extends Object> (T instance, {String? name, String? session}) → void -
Registers a dependency
instanceof typeT.override -
registerIfAbsent<
T extends Object> (T instance, {String? name, String? session}) → void -
Registers
instanceonly if nothing is already registered for the same type and optionalname.override -
registerIfIsNot<
T extends Object> (T instance, {String? name, String? session}) → void -
Use registerIfAbsent instead.
override
-
registerLazy<
T extends Object> (T callback(), {String? name}) → void -
Registers a lazy dependency that will be instantiated when first requested.
override
-
removeObserver(
Function observer) → void -
removeScopeHandler(
String scopeName) → Future< void> -
Removes the
ScopeHandlerthat handles the scope withscopeName.override -
reset(
) → void -
Clears all registered dependencies, active scopes, and scope handlers.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister<
T extends Object> ({Type? type, String? name}) → void -
Unregisters a dependency object by its type
Torname.override -
unregisterDependenciesRegisteredByThisProxy(
) → void - unregister all dependency objects registered using this proxy-weaver by the scope handler
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited