org.springframework.beans.factory.BeanFactory
interface.
This bean factory interface is not meant to be used in normal application
code: Stick to or
org.springframework.beans.factory.BeanFactory for typical
needs. This extended interface is just meant to allow for framework-internal
plug'n'play and for special access to bean factory configuration methods.
org.springframework.beans.factory.ListableBeanFactory
org.springframework.beans.factory.BeanFactoryorg.springframework.beans.factory.ListableBeanFactoryConfigurableListableBeanFactorypublic interfaceConfigurableBeanFactory extends HierarchicalBeanFactory, SingletonBeanRegistry {
Note that the parent cannot be changed: It should only be set outside a constructor if it isn't available at the time of factory instantiation.
parentBeanFactory the parent BeanFactoryjava.lang.IllegalStateException if this factory is already associated with
a parent BeanFactoryorg.springframework.beans.factory.HierarchicalBeanFactory.getParentBeanFactory()Note that this class loader will only apply to bean definitions that do not carry a resolved bean class yet. This is the case as of Spring 2.0 by default: Bean definitions only carry bean class names, to be resolved once the factory processes the bean definition.
beanClassLoader the class loader to use,
or null to suggest the default class loaderA temporary ClassLoader is usually just specified if load-time weaving is involved, to make sure that actual bean classes are loaded as lazily as possible. The temporary loader is then removed once the BeanFactory completes its bootstrap phase.
Turn this flag off to enable hot-refreshing of bean definition objects and in particular bean classes. If this flag is off, any creation of a bean instance will re-query the bean class loader for newly resolved classes.
Such a registrar creates new PropertyEditor instances and registers them
on the given registry, fresh for each bean creation attempt. This avoids
the need for synchronization on custom editors; hence, it is generally
preferable to use this method instead of .
registerCustomEditor(java.lang.Class,java.lang.Class)
registrar the PropertyEditorRegistrar to registerNote that this method will register a shared custom editor instance;
access to that instance will be synchronized for thread-safety. It is
generally preferable to use instead
of this method, to avoid for the need for synchronization on custom editors.
addPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)
requiredType type of the propertypropertyEditorClass the java.beans.PropertyEditor class to registerNote that this method will register a shared custom editor instance;
access to that instance will be synchronized for thread-safety. It is
generally preferable to use instead
of this method, to avoid for the need for synchronization on custom editors.
addPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)
addPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)
and registerCustomEditor(java.lang.Class,java.lang.Class)requiredType type of the propertypropertyEditor editor to registerThis will only return the names of explicitly registered scopes. Built-in scopes such as "singleton" and "prototype" won't be exposed.
registerScope(java.lang.String,org.springframework.beans.factory.config.Scope)This will only return explicitly registered scopes. Built-in scopes such as "singleton" and "prototype" won't be exposed.
scopeName the name of the scopenull if noneregisterScope(java.lang.String,org.springframework.beans.factory.config.Scope)Should include all standard configuration settings as well as BeanPostProcessors, Scopes, and factory-specific internal settings. Should not include any metadata of actual bean definitions, such as BeanDefinition objects and bean name aliases.
otherFactory the other BeanFactory to copy fromTypically invoked during factory configuration, but can also be used for runtime registration of aliases. Therefore, a factory implementation should synchronize alias access.
beanName the canonical name of the target beanalias the alias to be registered for the beanorg.springframework.beans.factory.BeanDefinitionStoreException if the alias is already in usebeanName the name of the bean to retrieve the merged definition fororg.springframework.beans.factory.NoSuchBeanDefinitionException if there is no bean definition with the given namename the name of the bean to checkfalse means the bean exists but is not a FactoryBean)org.springframework.beans.factory.NoSuchBeanDefinitionException if there is no bean with the given nameAny exception that arises during destruction should be caught and logged instead of propagated to the caller of this method.
beanName the name of the bean definitionbeanInstance the bean instance to destroy