factory

abstract fun <C : Any, A, T : Any> factory(    key: DI.Key<C, A, T>,     context: C,     overrideLevel: Int = 0): (A) -> T

Retrieve a factory for the given key.

Return

The found factory.

Parameters

C

The key context type.

A

The key argument type.

T

The key return type.

key

The key to look for.

context

The context to pass to the binding.

overrideLevel

0 if looking for a regular binding, 1 or more if looking for a binding that has been overridden.

Throws

If no factory was found.

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