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>
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
Properties
Link copied to clipboard
The type of contexts that are to be set when using this factory.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The description of this factory (using simple type names), used for debug print only.
Link copied to clipboard
The description of this factory (using full type names), used for debug print only.
Link copied to clipboard
Whether this bindings supports subtype handling.