winter / io.jentz.winter / Component / Builder / constant

constant

inline fun <reified R : Any> constant(value: R, qualifier: Any? = null, generics: Boolean = false, override: Boolean = false): TypeKey<R>

Register a constant of type R.

Parameters

value - The value of this constant provider.

qualifier - An optional qualifier.

generics - If true this will preserve generic information of R.

override - If true this will override an existing factory of this type.