koin-core / org.koin.core.instance / InstanceHolder

InstanceHolder

interface InstanceHolder<T>

Properties

bean

abstract val bean: BeanDefinition<T>

Functions

create

open fun <T> create(parameters: ParameterDefinition): T

get

abstract fun <T> get(parameters: ParameterDefinition): Instance<T>

release

abstract fun release(): Unit

Inheritors

FactoryInstanceHolder

class FactoryInstanceHolder<T> : InstanceHolder<T>

InstanceHolder - Factory create a new instance each time

ScopeInstanceHolder

class ScopeInstanceHolder<T> : InstanceHolder<T>

Scope - InstanceHolder create a unique instance

SingleInstanceHolder

class SingleInstanceHolder<T : Any> : InstanceHolder<T>

Single - InstanceHolder create a unique instance