koin-core / org.koin.core.instance / InstanceFactory

InstanceFactory

open class InstanceFactory

Instance factory - handle objects creation against BeanRegistry

Author

Constructors

<init>

InstanceFactory()

Instance factory - handle objects creation against BeanRegistry

Properties

callbacks

val callbacks: ArrayList<ModuleCallBack>

instances

val instances: ArrayList<InstanceHolder<*>>

Functions

clear

fun clear(): Unit

Clear all resources

create

open fun <T : Any> create(def: BeanDefinition<T>, scope: Scope? = null): InstanceHolder<T>

Create InstanceHolder

delete

fun delete(definition: BeanDefinition<*>): Unit

Delete Instance Holder

find

fun <T> find(def: BeanDefinition<T>, scope: Scope? = null): InstanceHolder<T>?

Find actual InstanceHolder

register

fun register(callback: ModuleCallBack): Unit

Register ModuleCallBack

release

fun release(definition: BeanDefinition<*>, scope: Scope? = null): Unit

Release definition instance

releasePath

fun releasePath(path: Path): Unit

Release single instance from their Path

retrieveInstance

fun <T : Any> retrieveInstance(def: BeanDefinition<T>, p: ParameterDefinition, scope: Scope? = null): Instance<T>

Retrieve or create instance from bean definition