class BeanRegistry : BeansProvider
BeansProvider that holds and provides beans which were explicitly registered before.
The BeanRegistry supports the singleton and prototype scopes by default.
Author
Christopher Frieler
fun addBeanScope(scopedFactoryBeanHandler: ScopedFactoryBeanHandler): Unit
Adds a bean-scope expressed by the given ScopedFactoryBeanHandler to this BeanRegistry. |
|
fun <T : Any> lookUpBeans(type: KClass<T>): List<T>
Looks up all beans of the given type in the BeanRegistry of this application. |
|
fun <T : Any> lookUpOptionalBean(name: String, type: KClass<T>): T?
Looks up the bean with the given name and type. fun <T : Any> lookUpOptionalBean(type: KClass<T>): T?
Looks up a bean of the given type. |
|
fun registerBean(bean: Any): String
Registers the bean with a generated name at this BeanRegistry and returns this name. fun registerBean(name: String, bean: Any): Unit
Registers the bean with the given name at this BeanRegistry. |
open fun <T : Any> lookUpBean(name: String, type: KClass<T>): T
Looks up the bean with the given name and type. open fun <T : Any> lookUpBean(name: String, type: Class<T>): T
Looks up the bean with the given name and Java type. open fun <T : Any> lookUpBean(type: KClass<T>): T
Looks up a bean of the given type. open fun <T : Any> lookUpBean(type: Class<T>): T
Looks up a bean of the given Java type. |
|
open fun <T : Any> lookUpBeans(type: Class<T>): List<T>
Looks up all beans of the given Java type in the BeanRegistry of this application. |
|
open fun <T : Any> lookUpOptionalBean(name: String, type: Class<T>): T?
Looks up the bean with the given name and Java type. open fun <T : Any> lookUpOptionalBean(type: Class<T>): T?
Looks up a bean of the given Java type. |