winter / io.jentz.winter / Graph / providerOrNullByKey

providerOrNullByKey

fun <R : Any> providerOrNullByKey(key: TypeKey<R>): Provider<R>?

Retrieve an optional provider function by key that returns R.

Parameters

key - The type key of the instance.

Return
The provider that returns R or null if provider doesn't exist.