ZenithOverride<T> class

Pairs a ZenithKey with a factory override function for testing or scoping. Registering a ZenithOverride with a ZenithContainer causes ZenithContainer.getOrCreate to use factory instead of the factory passed at the call site whenever key is requested.

Constructors

ZenithOverride(ZenithKey<T> key, T factory(ZenithRef ref))
Creates a ZenithOverride that replaces the factory for key.

Properties

factory → T Function(ZenithRef ref)
The replacement factory function.
final
hashCode → int
The hash code for this object.
no setterinherited
key → ZenithKey<T>
The key to override.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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