open class BeanDefinition<T : Any>
A BeanDefinition defines a bean through its type, a function to create the bean and optionally with a name.
Author
Christopher Frieler
BeanDefinition(name: String? = null, type: KClass<T>, creator: (BeansProvider) -> T)
A BeanDefinition defines a bean through its type, a function to create the bean and optionally with a name. |
open fun canProduce(type: KClass<*>): Boolean
Indicates whether this BeanDefinition will produce a bean of the given type (or a subtype). |
|
fun getName(): String?
Returns the name for the defined bean or |
|
fun getType(): KClass<T>
Returns the type of the defined bean. |
|
fun produceBean(dependencyProvider: BeansProvider): T
Produces the bean by invoking the creator function. |
class ScopedBeanDefinition<F : ScopedFactoryBean<*>, T : Any> : BeanDefinition<F>
Special BeanDefinition for ScopedFactoryBeans that is also aware of the type of bean produced by the factory-bean. |