ktp / toothpick.ktp.delegate / InjectDelegate

InjectDelegate

sealed class InjectDelegate<T : Any>

Property delegate base class. It allows to delegate the creation of fields to KTP. A typical example is

Properties

clz

val clz: Class<T>

instance

abstract val instance: T

name

val name: String?

Functions

getValue

operator fun getValue(thisRef: Any, property: KProperty<*>): T

isEntryPointInjected

abstract fun isEntryPointInjected(): Boolean

onEntryPointInjected

abstract fun onEntryPointInjected(scope: Scope): Unit

Inheritors

EagerDelegate

class EagerDelegate<T : Any> : InjectDelegate<T>

Delegate for fields that should be injected eagerly.

LazyDelegate

class LazyDelegate<T : Any> : InjectDelegate<T>

Delegate for fields that should be injected lazily.

ProviderDelegate

class ProviderDelegate<T : Any> : InjectDelegate<T>

Delegate for fields that should be injected as a provider.