DirectDIBase

interface DirectDIBase : DirectDIAware

See also

Functions

Link copied to clipboard
abstract fun <A, T : Any> Factory(    argType: TypeToken<in A>,     type: TypeToken<T>,     tag: Any? = null): (A) -> T

Gets a factory of T for the given argument type, return type and tag.

Link copied to clipboard
abstract fun <A, T : Any> FactoryOrNull(    argType: TypeToken<in A>,     type: TypeToken<T>,     tag: Any? = null): (A) -> T?

Gets a factory of T for the given argument type, return type and tag, or null if none is found.

Link copied to clipboard
abstract fun <T : Any> Instance(type: TypeToken<T>, tag: Any? = null): T

Gets an instance of T for the given type and tag.

abstract fun <A, T : Any> Instance(    argType: TypeToken<in A>,     type: TypeToken<T>,     tag: Any? = null,     arg: A): T

Gets an instance of T for the given type and tag, curried from a factory for the given argument type.

Link copied to clipboard
abstract fun <T : Any> InstanceOrNull(type: TypeToken<T>, tag: Any? = null): T?

Gets an instance of T for the given type and tag, or null if none is found.

abstract fun <A, T : Any> InstanceOrNull(    argType: TypeToken<in A>,     type: TypeToken<T>,     tag: Any? = null,     arg: A): T?

Gets an instance of T for the given type and tag, curried from a factory for the given argument type, or null if none is found.

Link copied to clipboard
abstract fun On(context: DIContext<*>): DirectDI

Returns a DirectDI with its context changed.

Link copied to clipboard
abstract fun <T : Any> Provider(type: TypeToken<T>, tag: Any? = null): () -> T

Gets a provider of T for the given type and tag.

abstract fun <A, T : Any> Provider(    argType: TypeToken<in A>,     type: TypeToken<T>,     tag: Any? = null,     arg: () -> A): () -> T

Gets a provider of T for the given type and tag, curried from a factory for the given argument type.

Link copied to clipboard
abstract fun <T : Any> ProviderOrNull(type: TypeToken<T>, tag: Any? = null): () -> T?

Gets a provider of T for the given type and tag, or null if none is found.

abstract fun <A, T : Any> ProviderOrNull(    argType: TypeToken<in A>,     type: TypeToken<T>,     tag: Any? = null,     arg: () -> A): () -> T?

Gets a provider of T for the given type and tag, curried from a factory for the given argument type, or null if none is found.

Properties

Link copied to clipboard
abstract val container: DIContainer

Every methods eventually ends up to a call to this container.

Link copied to clipboard
open val di: DI

Returns a regular DI instance (DI is lazy by default).

Link copied to clipboard
abstract val directDI: DirectDI

A Direct DI Aware class must be within reach of a DirectDI object.

Link copied to clipboard
abstract val lazy: DI

Returns a regular DI instance (DI is lazy by default).

Inheritors

Link copied to clipboard