ReflectiveInjector class abstract

An injector that resolves Provider instances with runtime information.

Implemented types

Constructors

ReflectiveInjector()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get(Object token, [Object? notFoundValue = throwIfNotFound]) → dynamic
Returns an instance from the injector based on the provided token.
inherited
injectFromAncestry<T>(Object token) → T
Injects and returns an object representing token from ancestors.
inherited
injectFromAncestryOptional(Object token, [Object? orElse = throwIfNotFound]) Object?
Injects and returns an object representing token from ancestors.
inherited
injectFromParent<T>(Object token) → T
Injects and returns an object representing token from the parent.
inherited
injectFromParentOptional(Object token, [Object? orElse = throwIfNotFound]) Object?
Injects and returns an object representing token from the parent.
inherited
injectFromSelf<T>(Object token) → T
Injects and returns an object representing token from this injector.
inherited
injectFromSelfOptional(Object token, [Object? orElse = throwIfNotFound]) Object?
Injects and returns an object representing token from this injector.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
provideToken<T extends Object>(OpaqueToken<T> token) → T
Finds and returns an object instance provided for a token.
inherited
provideTokenOptional<T extends Object>(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
provideTypeOptional<T extends Object>(Type token) → T?
Finds and returns an object instance provided for a type token.
inherited
provideUntyped<T>(Object token, [Object? orElse = throwIfNotFound]) → T
Injects and returns an object representing token.
inherited
resolveAndCreateChild(List<Object> providersOrLists) ReflectiveInjector
Creates a new child reflective injector from providersOrLists.
resolveAndInstantiate(Object providerOrType) → dynamic
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

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