Home

hexagon_core / com.hexagonkt.injection / InjectionManager

InjectionManager

object InjectionManager

Generators registry and utilities. This object keep tracks of supplier functions or specific objects bound to classes. Different suppliers can be bound to the same type using 'tags'.

Functions

Name Summary
bind fun <T :Any, R : T> bind(type:KClass<T>, tag:Any, force:Boolean, provider: () -> R):Unit
fun <T :Any, R : T> bind(type:KClass<T>, tag:Any, provider: () -> R):Unit
fun <T :Any, R : T> bind(type:KClass<T>, provider: () -> R):Unit
fun <T :Any> bind(tag:Any, provider: () -> T):Unit
fun <T :Any> bind(provider: () -> T):Unit
bindObject fun <T :Any, R : T> bindObject(type:KClass<T>, tag:Any, instance: R):Unit
fun <T :Any, R : T> bindObject(type:KClass<T>, instance: R):Unit
fun <T :Any> bindObject(tag:Any, instance: T):Unit
fun <T :Any> bindObject(instance: T):Unit
forceBind fun <T :Any, R : T> forceBind(type:KClass<T>, tag:Any, provider: () -> R):Unit
fun <T :Any, R : T> forceBind(type:KClass<T>, provider: () -> R):Unit
fun <T :Any> forceBind(tag:Any, provider: () -> T):Unit
fun <T :Any> forceBind(provider: () -> T):Unit
forceBindObject fun <T :Any, R : T> forceBindObject(type:KClass<T>, tag:Any, instance: R):Unit
fun <T :Any, R : T> forceBindObject(type:KClass<T>, instance: R):Unit
fun <T :Any> forceBindObject(tag:Any, instance: T):Unit
fun <T :Any> forceBindObject(instance: T):Unit
inject fun <T :Any> inject(type:KClass<T>, tag:Any): T
fun <T :Any> inject(tag:Any): T
fun <T :Any> inject(type:KClass<T>): T
fun <T :Any> inject(): T
invoke operator fun invoke(block:InjectionManager.() ->Unit):InjectionManager