winter / io.jentz.winter / ComponentBuilder / factory

factory

inline fun <reified A : Any, reified R : Any> factory(qualifier: Any? = null, generics: Boolean = false, override: Boolean = false, noinline postConstruct: GFactoryCallback2<A, R>? = null, noinline factory: GFactory1<A, R>): Unit

Register a factory from type (A) -> R.

Parameters

qualifier - An optional qualifier.

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

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

postConstruct - A post construct callback.

factory - The factory factory.