ReflectiveInjector class

An injector that resolves Provider instances with runtime information.

Constructors

ReflectiveInjector()

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
parent → HierarchicalInjector
@protected, final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

resolveAndCreateChild(List<Object> providersOrLists) ReflectiveInjector
Creates a new child reflective injector from providersOrLists.
resolveAndInstantiate(dynamic providerOrType) → dynamic
@Deprecated('Unsupported, here for compatibility only. Remove usage.')
get(Object token, [ Object notFoundValue = throwIfNotFound ]) → dynamic
Returns an instance from the injector based on the provided token. [...]
@mustCallSuper, inherited
injectFromAncestry<T>(Object token) → T
Injects and returns an object representing token from ancestors. [...]
@protected, inherited
injectFromAncestryOptional(Object token, [ Object orElse = throwIfNotFound ]) → Object
Injects and returns an object representing token from ancestors. [...]
@protected, inherited
injectFromParent<T>(Object token) → T
Injects and returns an object representing token from the parent. [...]
@protected, inherited
injectFromParentOptional(Object token, [ Object orElse = throwIfNotFound ]) → Object
Injects and returns an object representing token from the parent. [...]
@protected, inherited
injectFromSelf<T>(Object token) → T
Injects and returns an object representing token from this injector. [...]
@protected, inherited
injectFromSelfOptional(Object token, [ Object orElse = throwIfNotFound ]) → Object
Injects and returns an object representing token from this injector. [...]
@protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
provideToken<T>(OpaqueToken<T> token) → T
Finds and returns an object instance provided for a token. [...]
inherited
provideType<T extends Object>(Type token) → T
Finds and returns an object instance provided for a type token. [...]
inherited
provideUntyped(Object token, [ Object orElse = throwIfNotFound ]) → Object
Injects and returns an object representing token. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Methods

resolveAndCreate(List<Object> providersOrLists, [ Injector parent = const EmptyInjector() ]) ReflectiveInjector
Creates a new Injector that resolves Provider instances at runtime. [...]
resolveStaticAndCreate(List<Object> providersOrLists, [ Injector parent = const EmptyInjector() ]) ReflectiveInjector
Creates a new Injector that resolves some Provider instances. [...]
@experimental