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
.
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.