Skip to content


hexagon_core / com.hexagonkt.injection

Package com.hexagonkt.injection

Utilities to bind classes to creation closures or instances, and inject instances of those classes later.


Name Summary
Generator data class Generator<out T :Any> :Provider<T>
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'.object InjectionManager
Instance data class Instance<out T :Any> :Provider<T>
Provider sealed class Provider<out T :Any>
Target data class Target<T :Any>


Name Summary
forceBind fun <T :Any, R : T> forceBind(type:KClass<T>, provider:Provider<R>, tag:Any= Unit):Unit
fun <T :Any, R : T> forceBind(type:KClass<T>, tag:Any= Unit, provider: () -> R):Unit
fun <T :Any, R : T> forceBind(type:KClass<T>, tag:Any, instance: R):Unit
fun <T :Any, R : T> forceBind(type:KClass<T>, instance: R):Unit
forceBindSet fun <T :Any, R : T> forceBindSet(type:KClass<T>, instances:List<Provider<R>>):Unit
fun <T :Any, R : T> forceBindSet(type:KClass<T>, providers:Map<Any,Provider<R>>):Unit