DefaultExtensibleInjectionEnvironment

Default implementation for ExtensibleInjectionEnvironment.

Constructors

Link copied to clipboard
fun DefaultExtensibleInjectionEnvironment(context: ExtensibleEnvironmentContext, metaContextKind: InjectionEnvironmentKind<*>)

Functions

Link copied to clipboard
abstract fun <T : Any> createInjector(identifier: Identifier<T>, onInjection: (T) -> Unit = {}): Injector<T>

Creates an Injector that can be used as a property delegator, bound against the given identifier.

Link copied to clipboard
open fun <T : Any> get(identifier: Identifier<T>): T

Gets the component identified by the given identifier. No guarantees are given on this function - it may not be idempotent, depending on the actual implementation.

Link copied to clipboard
abstract fun getAllIdentifiers(): Sequence<Identifier<*>>

Returns a sequence of all the known identifiers present in this environment.

Link copied to clipboard
abstract fun <T : Any> getOrNull(identifier: Identifier<T>): T?

Gets the component identified by the given identifier, or null if no such component exists. No guarantees are given on this function - it may not be idempotent, depending on the actual implementation.

Link copied to clipboard
abstract fun <T : Any> getResolverOrNull(identifier: Identifier<T>): IdentifierResolver<T>?

Returns the resolver associated with the given identifier.

Properties

Link copied to clipboard
open override val metaEnvironment: InjectionEnvironment

The meta environment for this environment.

Inheritors

Link copied to clipboard