Skip to content

Index

//hexagon_core/com.hexagonkt.injection/InjectionManager

InjectionManager

[jvm] 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 [jvm]
Content
inline fun <T : Any> bind(noinline provider: () -> T)
inline fun <T : Any> bind(providers: List<() -> T>)
inline fun <T : Any> bind(providers: Map<Any, () -> T>)
inline fun <T : Any> bind(instance: T, tag: Any = Unit)
inline fun <T : Any> bind(tag: Any, noinline provider: () -> T)
fun <T : Any, R : T> bind(type: KClass<T>, instance: R)
fun <T : Any, R : T> bind(type: KClass<T>, provider: () -> R)
fun <T : Any, R : T> bind(type: KClass<T>, providers: List<() -> R>)
fun <T : Any, R : T> bind(type: KClass<T>, providers: Map<Any, () -> R>)
fun <T : Any, R : T> bind(type: KClass<T>, instance: R, tag: Any = Unit)
fun <T : Any, R : T> bind(type: KClass<T>, provider: Provider<R>, tag: Any = Unit)
fun <T : Any, R : T> bind(type: KClass<T>, tag: Any = Unit, provider: () -> R)


bindSet [jvm]
Content
inline fun <T : Any> bindSet(instances: List<T>)
inline fun <T : Any> bindSet(instances: Map<Any, T>)
fun <T : Any, R : T> bindSet(type: KClass<T>, instances: List<R>)
fun <T : Any, R : T> bindSet(type: KClass<T>, instances: Map<Any, R>)


inject [jvm]
Content
inline fun <T : Any> inject(): T
inline fun <T : Any> inject(tag: Any): T
fun <T : Any> inject(type: KClass<T>): T
fun <T : Any> inject(type: KClass<T>, tag: Any): T


injectList [jvm]
Content
fun <T : Any> injectList(type: KClass<T>): List<T>


injectMap [jvm]
Content
fun <T : Any> injectMap(type: KClass<T>): Map<Any, T>


injectOrNull [jvm]
Content
inline fun <T : Any> injectOrNull(): T?
inline fun <T : Any> injectOrNull(tag: Any): T?
fun <T : Any> injectOrNull(type: KClass<T>): T?
fun <T : Any> injectOrNull(type: KClass<T>, tag: Any): T?


toString [jvm]
Content
open override fun toString(): String