fun <T : Any> bean(beanDefinition: BeanDefinition<T>): Unit
Defines a bean through a BeanDefinition.
This is mainly a wrapper around addBeanDefinition to provide a declarative API to be used with a factory-function for the BeanDefinition
beanDefinition - the BeanDefinition
See Also
inline fun <reified T : Any> bean(name: String? = null, noinline definition: BeansProvider.() -> T): Unit
Defines a bean, optionally with the specified name.
name - the bean's name (optional)
definition - the definition to construct the bean
@JvmOverloads fun <T : Any> bean(name: String? = null, type: Class<T>, definition: BeansProvider.() -> T): Unit@JvmOverloads fun <T : Any> bean(name: String? = null, type: Class<T>, definition: () -> T): Unit
Defines a bean (optionally with the specified name) of a Java type.
This version of bean() is intended for Java interoperability.