AllProviders

abstract fun <T : Any> AllProviders(type: TypeToken<T>, tag: Any? = null): List<() -> T>

Gets all providers that can return a T for the given type and tag.

Return

A list of matching providers of T.

Parameters

T

The type of object to retrieve with the returned factory.

type

The type of object to retrieve with the returned factory.

tag

The bound tag, if any.

Throws

org.kodein.di.DI.DependencyLoopException

When calling the factory, if the value construction triggered a dependency loop.

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

Gets all providers that can return a T for the given type and tag, curried from factories for the given argument type.

Return

A list of matching providers of T.

Parameters

A

The type of argument the returned factory takes.

T

The type of object to retrieve with the returned factory.

argType

The type of argument the returned factory takes.

type

The type of object to retrieve with the returned factory.

tag

The bound tag, if any.

arg

A function that returns the argument that will be given to the factory when curried.

Throws

org.kodein.di.DI.DependencyLoopException

When calling the factory, if the value construction triggered a dependency loop.