public abstract class BeanDefinition extends BeanConfiguration
BeanConfiguration to define a single bean.BeanConfiguration.Readiness| Modifier | Constructor and Description |
|---|---|
protected |
BeanDefinition() |
protected |
BeanDefinition(java.lang.String beanName) |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.Object |
bean() |
void |
defineBeans(BeansCollector beansCollector)
Defines beans for the context of this application by calling
BeanConfigurationsBeansCollector.defineBean(String, Object) or
BeanConfigurationsBeansCollector.defineBean(Object). |
getDependencies, isReadyToDefineBeans, requireBean, requireBean, requireBeans, requireOptionalBeanprotected BeanDefinition()
protected BeanDefinition(java.lang.String beanName)
public abstract java.lang.Object bean()
public final void defineBeans(BeansCollector beansCollector)
BeanConfigurationBeanConfigurationsBeansCollector.defineBean(String, Object) or
BeanConfigurationsBeansCollector.defineBean(Object).
Other beans can by obtained by declaring BeanDependencys to satisfy dependencies of the defined beans
through BeanConfiguration.getDependencies(). Hence, the require-methods that register BeanDependencys must not be
called inside this method; this must be done earlier. And take care not to create cyclic dependencies between
BeanConfigurations which are unresolvable.
This method must not be called before BeanConfiguration.isReadyToDefineBeans(BeansProvider) returned
true.
defineBeans in class BeanConfigurationbeansCollector - the BeanConfigurationsBeansCollector that collects the beansBeanConfigurationsBeansCollector.defineBean(String, Object),
BeanConfigurationsBeansCollector.defineBean(Object)