org.springframework.beans.factory.support
Class DefaultListableBeanFactory
org.springframework.beans.factory.support.AbstractBeanFactory
|
+--org.springframework.beans.factory.support.DefaultListableBeanFactory
- Direct Known Subclasses:
- XmlBeanFactory
- public class DefaultListableBeanFactory
- extends AbstractBeanFactory
- implements BeanDefinitionRegistry, ConfigurableListableBeanFactory
Concrete implementation of ListableBeanFactory.
Can be used as a standalone bean factory,
or as a superclass for custom bean factories.
- Author:
- Rod Johnson, Juergen Hoeller
- Version: $Id: DefaultListableBeanFactory.java,v 1.15 2004/02/04 17:23:46 jhoeller Exp $
- Since: 16 April 2001
| Methods inherited from class org.springframework.beans.factory.support.AbstractBeanFactory |
addBeanPostProcessor, applyBeanPostProcessorsAfterInitialization, applyBeanPostProcessorsBeforeInitialization, autowire, autowireBeanProperties, containsBean, destroySingletons, getAliases, getBean, getBean, getBeanPostProcessors, getConstructorArgumentValues, getCustomEditors, getIgnoredDependencyTypes, getMergedBeanDefinition, getParentBeanFactory, getPropertyValues, getSingletonNames, ignoreDependencyType, isSingleton, registerAlias, registerCustomEditor, registerSingleton, setParentBeanFactory |
DefaultListableBeanFactory
public DefaultListableBeanFactory()
- Create a new DefaultListableBeanFactory.
DefaultListableBeanFactory
public DefaultListableBeanFactory(BeanFactory parentBeanFactory)
- Create a new DefaultListableBeanFactory with the given parent.
containsBeanDefinition
public boolean containsBeanDefinition(String name)
getBeanDefinition
public AbstractBeanDefinition getBeanDefinition(String beanName)
throws org.springframework.beans.BeansException
getBeanDefinitionCount
public int getBeanDefinitionCount()
getBeanDefinitionNames
public String[] getBeanDefinitionNames()
getBeanDefinitionNames
public String[] getBeanDefinitionNames(Class type)
- Note that this method is slow. Don't invoke it too often:
it's best used only in application initialization.
getBeansOfType
public Map getBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans)
throws org.springframework.beans.BeansException
preInstantiateSingletons
public void preInstantiateSingletons()
registerBeanDefinition
public void registerBeanDefinition(String name, AbstractBeanDefinition beanDefinition)
throws org.springframework.beans.factory.BeanDefinitionStoreException
setAllowBeanDefinitionOverriding
public void setAllowBeanDefinitionOverriding(boolean allowBeanDefinitionOverriding)
- Set if it should be allowed to override bean definitions by registering a
different definition with the same name, automatically replacing the former.
If not, an exception will be thrown. Default is true.
toString
public String toString()
to Class java.util.Map- Map of BeanDefinition objects, keyed by prototype name