Singleton
class Singleton<C : Any, T : Any>( val scope: Scope<C>, val contextType: TypeToken<in C>, explicitContext: Boolean, val createdType: TypeToken<out T>, refMaker: RefMaker? = null, val sync: Boolean = true, val creator: NoArgBindingDI<C>.() -> T) : NoArgDIBinding<C, T>
Content copied to clipboard
Singleton Binding: will create an instance on first request and will subsequently always return the same instance.
Parameters
T
The created type.
created Type
The type of the created object, used for debug print only.
creator
The function that will be called the first time an instance is requested. Guaranteed to be called only once. Should create a new instance.
Constructors
Functions
Link copied to clipboard
The full(er) name of this factory, used for debug print only.
Link copied to clipboard
The name of this factory, used for debug print only.
Link copied to clipboard