koin-core / org.koin.core.instance / ScopedInstanceFactory

ScopedInstanceFactory

class ScopedInstanceFactory<T> : InstanceFactory<T>

Single instance holder

Author
Arnaud Giuliani

Constructors

<init>

Single instance holder

ScopedInstanceFactory(beanDefinition: BeanDefinition<T>)

Functions

create

Create an instance

fun create(context: InstanceContext): T

drop

Drop the instance

fun drop(scope: Scope?): Unit

dropAll

fun dropAll(): Unit

get

Retrieve an instance

fun get(context: InstanceContext): T

isCreated

Is instance created

fun isCreated(context: InstanceContext?): Boolean