https://kotlinlang.org logo
#kodein
Title
# kodein
a

apatrida

06/28/2016, 12:17 PM
Copy code
inline fun <reified R : Any, reified T : Any> R.injectLogger(): Lazy<T> {
    return lazy { Injekt.logger(fullType<T>(), R::class.java) }
}

inline fun <reified T : Any, O : Any> injectLogger(forClass: KClass<O>): Lazy<T> {
    return lazy { Injekt.logger(fullType<T>(), forClass.java) }
}

inline fun <reified T : Any, O : Any> injectLogger(forClass: Class<O>): Lazy<T> {
    return lazy { Injekt.logger(fullType<T>(), forClass) }
}

inline fun <reified T : Any> injectLogger(byName: String): Lazy<T> {
    return lazy { Injekt.logger(fullType<T>(), byName) }
}