winter / io.jentz.winter / Graph / instanceOrNullByKey

instanceOrNullByKey

fun <R : Any> instanceOrNullByKey(key: TypeKey<R>): R?

Retrieve an optional instance of R by key.

Parameters

key - The type key of the instance.

Return
An instance of R or null if provider doesn't exist.