org.springframework.beans.factory.config
Interface ConfigurableListableBeanFactory
- All Superinterfaces:
- AutowireCapableBeanFactory, BeanFactory, ConfigurableBeanFactory, HierarchicalBeanFactory, ListableBeanFactory
- All Known Implementing Classes:
- DefaultListableBeanFactory
- public interface ConfigurableListableBeanFactory
- extends ListableBeanFactory, AutowireCapableBeanFactory, ConfigurableBeanFactory
SPI interface to be implemented by most if not all listable bean factories.
In addition to ConfigurableBeanFactory, it provides means to evaluate bean
definitions and to pre-instantiate singletons.
Allows for framework-internal plug'n'play, e.g. in AbstractApplicationContext.
- Since:
- 03.11.2003
- Author:
- Juergen Hoeller
- See Also:
AbstractApplicationContext.getBeanFactory()
Method Summary |
BeanDefinition |
getBeanDefinition(String beanName)
Return the registered BeanDefinition for the given bean, allowing access
to its property values and constructor argument value (which can be
modified during bean factory post-processing).
|
void |
preInstantiateSingletons()
Ensure that all non-lazy-init singletons are instantiated, also considering
FactoryBeans. |
getBeanDefinition
public BeanDefinition getBeanDefinition(String beanName)
throws BeansException
- Return the registered BeanDefinition for the given bean, allowing access
to its property values and constructor argument value (which can be
modified during bean factory post-processing).
A returned BeanDefinition object should not be a copy but the original
definition object as registered in the factory. This means that it should
be castable to a more specific implementation type, if necessary.
- Parameters:
beanName
- name of the bean
- Returns:
- the registered BeanDefinition
- Throws:
NoSuchBeanDefinitionException
- if there is no bean with the given name
BeansException
- in case of errors
preInstantiateSingletons
public void preInstantiateSingletons()
throws BeansException
- Ensure that all non-lazy-init singletons are instantiated, also considering
FactoryBeans. Typically invoked at the end of factory setup, if desired.
As this is a startup method, it should destroy already created singletons
if it fails, to avoid dangling resources. In other words, after invocation
of that method, either all or no singletons at all should be instantiated.
- Throws:
BeansException
- if one of the singleton beans could not be created
Copyright (C) 2003-2004 The Spring Framework Project.