Singleton
class Singleton<C : Any, T : Any>(scope: Scope<C>, contextType: TypeToken<in C>, explicitContext: Boolean, createdType: TypeToken<out T>, refMaker: RefMaker?, sync: Boolean, 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
factory Full Name
Link copied to clipboard
The full(er) name of this factory, used for debug print only.
factory Name
Link copied to clipboard
The name of this factory, used for debug print only.
get Factory
Link copied to clipboard
Properties
contextType
Link copied to clipboard
createdType
Link copied to clipboard
creator
Link copied to clipboard
description
Link copied to clipboard
fullDescription
Link copied to clipboard
supportSubTypes
Link copied to clipboard