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.
createdType
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
Singleton
Link copied to clipboard
Functions
factoryFullName
Link copied to clipboard
factoryName
Link copied to clipboard
getFactory
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