inline fun <reified R : Any> singleton(qualifier: Any? = null, generics: Boolean = false, override: Boolean = false, noinline postConstruct: GFactoryCallback1<R>? = null, noinline dispose: GFactoryCallback1<R>? = null, noinline factory: GFactory0<R>): Unit
Register a singleton scoped factory for an instance of type R.
qualifier
- An optional qualifier.
generics
- If true this will preserve generic information of R.
override
- If true this will override a existing provider of this type.
postConstruct
- A post construct callback.
dispose
- A callback that gets called when the dependency graph gets disposed.
factory
- The factory for type R.