koin-core / org.koin.core.bean / BeanRegistry

BeanRegistry

class BeanRegistry

Bean registry gather definitions of beans & communicate with instance factory to handle instances

Author

Constructors

<init>

BeanRegistry()

Bean registry gather definitions of beans & communicate with instance factory to handle instances

Properties

definitions

val definitions: HashSet<BeanDefinition<*>>

Functions

clear

fun clear(): Unit

Clear resources

declare

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

Add/Replace an existing bean

getDefinitionsInPaths

fun getDefinitionsInPaths(paths: Set<Path>): List<BeanDefinition<*>>

Get bean definitions from given path

retrieveDefinition

fun <T> retrieveDefinition(clazz: KClass<*>, scope: Scope?, definitionResolver: () -> List<BeanDefinition<*>>, lastInStack: BeanDefinition<*>?): BeanDefinition<T>

Retrieve bean definition

searchByClass

fun searchByClass(definitions: Collection<BeanDefinition<*>>, clazz: KClass<*>): List<BeanDefinition<*>>

searchByNameAndClass

fun searchByNameAndClass(definitions: Collection<BeanDefinition<*>>, name: String, clazz: KClass<*>): List<BeanDefinition<*>>