factory Or Null
abstract fun <C : Any, A, T : Any> factoryOrNull(key: DI.Key<C, A, T>, context: C, overrideLevel: Int = 0): (A) -> T?
Content copied to clipboard
Retrieve a factory for the given key, or null if none is found.
Return
The found factory, or null if no factory was found.
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.
override Level
0 if looking for the regular binding, 1 or more if looking for a binding that has been overridden.
Throws
When calling the factory function, if the instance construction triggered a dependency loop.