The Spring Framework

org.springframework.beans.factory.config
Interface ConfigurableListableBeanFactory

All Superinterfaces:
AutowireCapableBeanFactory, BeanFactory, ConfigurableBeanFactory, HierarchicalBeanFactory, ListableBeanFactory, SingletonBeanRegistry
All Known Implementing Classes:
DefaultListableBeanFactory, XmlBeanFactory

public interface ConfigurableListableBeanFactory
extends ListableBeanFactory, AutowireCapableBeanFactory, ConfigurableBeanFactory

Configuration interface to be implemented by most listable bean factories. In addition to ConfigurableBeanFactory, it provides facilities to analyze and modify bean definitions, and to pre-instantiate singletons.

This subinterface of BeanFactory is not meant to be used in normal application code: Stick to BeanFactory or ListableBeanFactory for typical use cases. This interface is just meant to allow for framework-internal plug'n'play even when needing access to bean factory configuration methods.

Since:
03.11.2003
Author:
Juergen Hoeller
See Also:
AbstractApplicationContext.getBeanFactory()

Field Summary
 
Fields inherited from interface org.springframework.beans.factory.config.AutowireCapableBeanFactory
AUTOWIRE_AUTODETECT, AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_CONSTRUCTOR, AUTOWIRE_NO
 
Fields inherited from interface org.springframework.beans.factory.config.ConfigurableBeanFactory
SCOPE_PROTOTYPE, SCOPE_SINGLETON
 
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 ignoreDependencyInterface(Class ifc)
          Ignore the given dependency interface for autowiring.
 void ignoreDependencyType(Class type)
          Ignore the given dependency type for autowiring: for example, String.
 void preInstantiateSingletons()
          Ensure that all non-lazy-init singletons are instantiated, also considering FactoryBeans.
 
Methods inherited from interface org.springframework.beans.factory.ListableBeanFactory
containsBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType
 
Methods inherited from interface org.springframework.beans.factory.config.AutowireCapableBeanFactory
applyBeanPostProcessorsAfterInitialization, applyBeanPostProcessorsBeforeInitialization, applyBeanPropertyValues, autowire, autowireBeanProperties, configureBean, createBean, initializeBean
 
Methods inherited from interface org.springframework.beans.factory.config.ConfigurableBeanFactory
addBeanPostProcessor, addPropertyEditorRegistrar, copyConfigurationFrom, destroyBean, destroyScopedBean, destroySingletons, getBeanClassLoader, getBeanPostProcessorCount, getRegisteredScope, getRegisteredScopeNames, getTypeConverter, isCacheBeanMetadata, isCurrentlyInCreation, registerAlias, registerCustomEditor, registerScope, setBeanClassLoader, setCacheBeanMetadata, setParentBeanFactory
 
Methods inherited from interface org.springframework.beans.factory.HierarchicalBeanFactory
containsLocalBean, getParentBeanFactory
 
Methods inherited from interface org.springframework.beans.factory.config.SingletonBeanRegistry
containsSingleton, getSingleton, getSingletonCount, getSingletonNames, registerSingleton
 

Method Detail

ignoreDependencyType

void ignoreDependencyType(Class type)
Ignore the given dependency type for autowiring: for example, String. Default is none.

Parameters:
type - the dependency type to ignore

ignoreDependencyInterface

void ignoreDependencyInterface(Class ifc)
Ignore the given dependency interface for autowiring.

This will typically be used by application contexts to register dependencies that are resolved in other ways, like BeanFactory through BeanFactoryAware or ApplicationContext through ApplicationContextAware.

By default, only the BeanFactoryAware interface is ignored. For further types to ignore, invoke this method for each type.

Parameters:
ifc - the dependency interface to ignore
See Also:
BeanFactoryAware, ApplicationContextAware

getBeanDefinition

BeanDefinition getBeanDefinition(String beanName)
                                 throws NoSuchBeanDefinitionException
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

preInstantiateSingletons

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.

Throws:
BeansException - if one of the singleton beans could not be created. Note: This may have left the factory with some beans already initialized! Call ConfigurableBeanFactory.destroySingletons() for full cleanup in this case.
See Also:
ConfigurableBeanFactory.destroySingletons()

The Spring Framework

Copyright © 2002-2007 The Spring Framework.