Factory Or Null
fun <A, T : Any> FactoryOrNull(argType: TypeToken<in A>, type: TypeToken<out T>): DIProperty<(A) -> T?>
Content copied to clipboard
Gets a factory of T for the given argument type and return type, or null if none is found. The name of the receiving property is used as tag.
Return
A factory of T, or null if no factory was found.
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.
Throws
When calling the factory, if the value construction triggered a dependency loop.