koin-core / org.koin.core / Koin

Koin

class Koin

Koin

Gather main features to use on Koin context

Author
Arnaud Giuliani

Constructors

<init>

Koin()

Koin

Properties

beanRegistry

val beanRegistry: BeanRegistry

propertyRegistry

val propertyRegistry: PropertyRegistry

scopeRegistry

val scopeRegistry: ScopeRegistry

Functions

close

fun close(): Unit

Close all resources from context

createScope

fun createScope(scopeId: ScopeID, qualifier: Qualifier? = null): Scope

Create a Scope instance

deleteScope

fun deleteScope(scopeId: ScopeID): Unit

Delete a scope instance

get

fun <T> get(qualifier: Qualifier? = null, scope: Scope = Scope.GLOBAL, parameters: ParametersDefinition? = null): T
fun <T> get(clazz: KClass<*>, qualifier: Qualifier?, scope: Scope = Scope.GLOBAL, parameters: ParametersDefinition?): T

Get a Koin instance

getOrCreateScope

fun getOrCreateScope(scopeId: ScopeID, qualifier: Qualifier? = null): Scope

Get or Create a Scope instance

getProperty

fun <T> getProperty(key: String, defaultValue: T): T
fun <T> getProperty(key: String): T?

Retrieve a property

getScope

fun getScope(scopeId: ScopeID): Scope

get a scope instance

getScopeOrNull

fun getScopeOrNull(scopeId: ScopeID): Scope?

get a scope instance

inject

fun <T> inject(qualifier: Qualifier? = null, scope: Scope = Scope.GLOBAL, parameters: ParametersDefinition? = null): Lazy<T>

Lazy inject a Koin instance

setProperty

fun <T : Any> setProperty(key: String, value: T): Unit

Save a property