get Factory
abstract fun getFactory(key: DI.Key<C, A, T>, di: BindingDI<C>): (A) -> T
Content copied to clipboard
Returns a factory for the given key. A factory is a function that returns an instance of type T function argument A.
Whether it's a new instance or not entirely depends on implementation.
Return
The instance of the requested type.
Parameters
di
: A DI instance (augmented for the binding). DO NOT USE IN THE RETURNED LAMBDA (would create a memory leak)!
key
: The key of the instance to get.