Eager Singleton
class EagerSingleton<T : Any>(builder: DIContainer.Builder, createdType: TypeToken<out T>, creator: NoArgBindingDI<Any>.() -> T) : NoArgDIBinding<Any, T>
Content copied to clipboard
Concrete eager singleton: will create an instance as soon as di is ready (all bindings are set) and will always return this instance.
Parameters
T
The created type.
created Type
The type of the created object.
creator
The function that will be called as soon as DI is ready. Guaranteed to be called only once. Should create a new instance.
Constructors
EagerSingleton
Link copied to clipboard
fun <T : Any> EagerSingleton(builder: DIContainer.Builder, createdType: TypeToken<out T>, creator: NoArgBindingDI<Any>.() -> T)
Content copied to clipboard
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