koin-core / org.koin.core.module / Module

Module

class Module

Koin Module Gather/help compose Koin definitions

Author
Arnaud Giuliani

Constructors

<init>

Module(isCreatedAtStart: Boolean, override: Boolean)

Koin Module Gather/help compose Koin definitions

Functions

declareDefinition

fun <T> declareDefinition(definition: BeanDefinition<T>, options: Options): Unit

Declare a definition in current Module

declareScope

fun declareScope(scope: ScopeSet): Unit

Declare a definition in current Module

factory

fun <T> factory(qualifier: Qualifier? = null, override: Boolean = false, definition: Definition<T>): BeanDefinition<T>

Declare a Factory definition

plus

operator fun plus(module: Module): List<Module>

Help write list of Modules

scope

fun scope(scopeName: Qualifier, scopeSet: ScopeSet.() -> Unit): Unit

Declare a group a scoped definition with a given scope qualifier

scoped

fun <T> scoped(qualifier: Qualifier? = null, override: Boolean = false, definition: Definition<T>): BeanDefinition<T>

Declare a ScopeInstance definition

single

fun <T> single(qualifier: Qualifier? = null, createdAtStart: Boolean = false, override: Boolean = false, definition: Definition<T>): BeanDefinition<T>

Declare a Single definition