ktp / toothpick.ktp.delegate / inject

inject

inline fun <reified T : Any> inject(): EagerDelegateProvider<T>

Parameters

T - the type of the thing to inject, the key of the binding.

Return
a property delegate that will inject eagerly an instance.

inline fun <reified T : Any> inject(name: String): EagerDelegateProvider<T>
inline fun <reified T : Any> inject(name: KClass<out Annotation>): EagerDelegateProvider<T>

Parameters

T - the type of the thing to inject, the key of the binding.

name - a nullable name to designate a specific named binding.

Return
a property delegate that will inject eagerly an instance.