Injector

class Injector(val parent: Injector? = null, val level: Int = 0)

Constructors

Link copied to clipboard
constructor(parent: Injector? = null, level: Int = 0)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class NotMappedException(val clazz: KClass<*>, val requestedByClass: KClass<*>, val ctx: Injector.RequestContext, val msg: String = "Not mapped ") : RuntimeException
Link copied to clipboard
data class RequestContext(val initialClazz: KClass<*>)

Properties

Link copied to clipboard
Link copied to clipboard
val level: Int = 0
Link copied to clipboard
Link copied to clipboard
val parent: Injector? = null
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun deinit()
Link copied to clipboard
fun dump()
Link copied to clipboard
inline fun <T : Any> get(): T
fun <T : Any> get(clazz: KClass<T>, ctx: Injector.RequestContext = RequestContext(clazz)): T
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> getOrNull(): T?
fun <T : Any> getOrNull(clazz: KClass<T>, ctx: Injector.RequestContext = RequestContext(clazz)): T?
Link copied to clipboard
fun <T : Any> getProvider(clazz: KClass<T>, ctx: Injector.RequestContext = RequestContext(clazz)): ObjectProvider<T>
Link copied to clipboard
fun <T : Any> getProviderOrNull(clazz: KClass<T>, ctx: Injector.RequestContext = RequestContext(clazz)): ObjectProvider<T>?
Link copied to clipboard
inline fun <T : Any> getSync(): T
Link copied to clipboard
inline fun <T : Any> getSyncOrNull(): T?
Link copied to clipboard
inline fun <T : Any> getWith(vararg instances: Any): T
fun <T : Any> getWith(clazz: KClass<T>, vararg instances: Any): T
Link copied to clipboard
fun <T : Any> has(clazz: KClass<T>): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any> mapFactory(noinline gen: Injector.() -> InjectorFactory<T>): Injector
fun <T : Any> mapFactory(clazz: KClass<T>, gen: Injector.() -> InjectorFactory<T>): Injector
Link copied to clipboard
inline fun <T : Any> mapInstance(instance: T): Injector
fun <T : Any> mapInstance(clazz: KClass<T>, instance: T): Injector
Link copied to clipboard
inline fun <T : Any> mapPrototype(noinline gen: Injector.() -> T): Injector
fun <T : Any> mapPrototype(clazz: KClass<T>, gen: Injector.() -> T): Injector
Link copied to clipboard
inline fun <T : Any> mapSingleton(noinline gen: Injector.() -> T): Injector
fun <T : Any> mapSingleton(clazz: KClass<T>, gen: Injector.() -> T): Injector
Link copied to clipboard
fun removeMapping(clazz: KClass<*>)
Link copied to clipboard
open override fun toString(): String