Top Description Inners Fields Constructors Methods
org.springframework.beans.factory.support

public abstract Class AbstractBeanFactory

extends FactoryBeanRegistrySupport
implements ConfigurableBeanFactory
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.config.ConfigurableBeanFactory, org.springframework.beans.factory.config.SingletonBeanRegistry, org.springframework.beans.factory.HierarchicalBeanFactory, org.springframework.beans.factory.BeanFactory
Known Direct Subclasses
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
Imports
java.beans.PropertyEditor, java.util.ArrayList, .Arrays, .Collection, .Collections, .HashMap, .HashSet, .LinkedHashMap, .LinkedHashSet, .List, .Map, .Set, java.util.concurrent.ConcurrentHashMap, .CopyOnWriteArrayList, java.util.function.Predicate, .UnaryOperator, org.springframework.beans.BeanUtils, .BeanWrapper, .BeansException, .PropertyEditorRegistrar, .PropertyEditorRegistry, .PropertyEditorRegistrySupport, .SimpleTypeConverter, .TypeConverter, .TypeMismatchException, org.springframework.beans.factory.BeanCreationException, .BeanCurrentlyInCreationException, .BeanDefinitionStoreException, .BeanFactory, .BeanFactoryUtils, .BeanIsAbstractException, .BeanIsNotAFactoryException, .BeanNotOfRequiredTypeException, .CannotLoadBeanClassException, .FactoryBean, .NoSuchBeanDefinitionException, .SmartFactoryBean, org.springframework.beans.factory.config.BeanDefinition, .BeanDefinitionHolder, .BeanExpressionContext, .BeanExpressionResolver, .BeanPostProcessor, .ConfigurableBeanFactory, .DestructionAwareBeanPostProcessor, .InstantiationAwareBeanPostProcessor, .Scope, .SmartInstantiationAwareBeanPostProcessor, org.springframework.core.DecoratingClassLoader, .NamedThreadLocal, .ResolvableType, org.springframework.core.convert.ConversionService, org.springframework.core.log.LogMessage, org.springframework.core.metrics.ApplicationStartup, .StartupStep, org.springframework.lang.Nullable, org.springframework.util.Assert, .ClassUtils, .ObjectUtils, .StringUtils, .StringValueResolver

Abstract base class for org.springframework.beans.factory.BeanFactory implementations, providing the full capabilities of the org.springframework.beans.factory.config.ConfigurableBeanFactory SPI. Does not assume a listable bean factory: can therefore also be used as base class for bean factory implementations which obtain bean definitions from some backend resource (where bean definition access is an expensive operation).

This class provides a singleton cache (through its base class org.springframework.beans.factory.support.DefaultSingletonBeanRegistry, singleton/prototype determination, org.springframework.beans.factory.FactoryBean handling, aliases, bean definition merging for child bean definitions, and bean destruction (org.springframework.beans.factory.DisposableBean interface, custom destroy methods). Furthermore, it can manage a bean factory hierarchy (delegating to the parent in case of an unknown bean), through implementing the org.springframework.beans.factory.HierarchicalBeanFactory interface.

The main template methods to be implemented by subclasses are getBeanDefinition and createBean, retrieving a bean definition for a given bean name and creating a bean instance for a given bean definition, respectively. Default implementations of those operations can be found in DefaultListableBeanFactory and AbstractAutowireCapableBeanFactory.

Authors
Rod Johnson, Juergen Hoeller, Costin Leau, Chris Beams, Phillip Webb, Sam Brannen
Since
15 April 2001
See Also
getBeanDefinition, createBean, AbstractAutowireCapableBeanFactory#createBean, DefaultListableBeanFactory#getBeanDefinition

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
AbstractBeanFactory.BeanPostProcessorCache

Internal cache of pre-filtered post-processors.

private class
AbstractBeanFactory.BeanPostProcessorCacheAwareList

CopyOnWriteArrayList which resets the beanPostProcessorCache field on modification.

Field Summary

Modifier and TypeField and Description
private final Set<String>
alreadyCreated

Names of beans that have already been created at least once.

private ApplicationStartup
applicationStartup

Application startup metrics.

private ClassLoader
beanClassLoader

ClassLoader to resolve bean class names with, if necessary.

private BeanExpressionResolver
beanExpressionResolver

Resolution strategy for expressions in bean definition values.

private AbstractBeanFactory.BeanPostProcessorCache
beanPostProcessorCache

Cache of pre-filtered post-processors.

private final List<BeanPostProcessor>
beanPostProcessors

BeanPostProcessors to apply.

private boolean
cacheBeanMetadata

Whether to cache bean metadata or rather reobtain it for every access.

private ConversionService
conversionService

Spring ConversionService to use instead of PropertyEditors.

private final Map<Class<?>, Class<? extends PropertyEditor>>
customEditors

Custom PropertyEditors to apply to the beans of this factory.

private final List<StringValueResolver>
embeddedValueResolvers

String resolvers to apply e.g. to annotation attribute values.

private final Map<String, RootBeanDefinition>
mergedBeanDefinitions

Map from bean name to merged RootBeanDefinition.

private BeanFactory
parentBeanFactory

Parent bean factory, for bean inheritance support.

private final Set<PropertyEditorRegistrar>
propertyEditorRegistrars

Custom PropertyEditorRegistrars to apply to the beans of this factory.

private final ThreadLocal<Object>
prototypesCurrentlyInCreation

Names of beans that are currently in creation.

private final Map<String, Scope>
scopes

Map from scope identifier String to corresponding Scope.

private ClassLoader
tempClassLoader

ClassLoader to temporarily resolve bean class names with, if necessary.

private TypeConverter
typeConverter

A custom TypeConverter to use, overriding the default PropertyEditor mechanism.

Constructor Summary

AccessConstructor and Description
public
AbstractBeanFactory()

Create a new AbstractBeanFactory.

public
AbstractBeanFactory(BeanFactory
parent bean factory, or null if none
parentBeanFactory
)

Create a new AbstractBeanFactory with the given parent.

Method Summary

Modifier and TypeMethod and Description
pack-priv <T> T
adaptBeanInstance(String name, Object bean, Class<?> requiredType)

public void
addBeanPostProcessor(BeanPostProcessor
the post-processor to register
beanPostProcessor
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.addBeanPostProcessor.

Add a new BeanPostProcessor that will get applied to beans created by this factory.

public void
addBeanPostProcessors(Collection<? extends BeanPostProcessor> beanPostProcessors)

Add new BeanPostProcessors that will get applied to beans created by this factory.

public void
addEmbeddedValueResolver(StringValueResolver
the String resolver to apply to embedded values
valueResolver
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.addEmbeddedValueResolver.

Add a String resolver for embedded values such as annotation attributes.

public void
addPropertyEditorRegistrar(PropertyEditorRegistrar
the PropertyEditorRegistrar to register
registrar
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.addPropertyEditorRegistrar.

Add a PropertyEditorRegistrar to be applied to all bean creation processes.

protected void
afterPrototypeCreation(String
the name of the prototype that has been created
beanName
)

Callback after prototype creation.

protected void
beforePrototypeCreation(String
the name of the prototype about to be created
beanName
)

Callback before prototype creation.

protected void
checkMergedBeanDefinition(RootBeanDefinition
the merged bean definition to check
mbd
,
String
the name of the bean
beanName
,
Object[]
the arguments for bean creation, if any
args
)

Check the given merged bean definition, potentially throwing validation exceptions.

protected void
cleanupAfterBeanCreationFailure(String
the name of the bean
beanName
)

Perform appropriate cleanup of cached metadata after bean creation failed.

protected void
clearMergedBeanDefinition(String
the bean name to clear the merged definition for
beanName
)

Remove the merged bean definition for the specified bean, recreating it on next access.

public void
clearMetadataCache()

Clear the merged bean definition cache, removing entries for beans which are not considered eligible for full metadata caching yet.

public boolean
containsBean(String
the name of the bean to query
name
)

Implements org.springframework.beans.factory.BeanFactory.containsBean.

Does this bean factory contain a bean definition or externally registered singleton instance with the given name?

protected abstract boolean

Returns:

if this bean factory contains a bean definition with the given name
containsBeanDefinition
(String
the name of the bean to look for
beanName
)

Check if this bean factory contains a bean definition with the given name.

public boolean
containsLocalBean(String
the name of the bean to query
name
)

Implements org.springframework.beans.factory.HierarchicalBeanFactory.containsLocalBean.

Return whether the local bean factory contains a bean of the given name, ignoring beans defined in ancestor contexts.

public void
copyConfigurationFrom(ConfigurableBeanFactory
the other BeanFactory to copy from
otherFactory
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.copyConfigurationFrom.

Copy all relevant configuration from the given other factory.

public void
copyRegisteredEditorsTo(PropertyEditorRegistry
the PropertyEditorRegistry to initialize
registry
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.copyRegisteredEditorsTo.

Initialize the given PropertyEditorRegistry with the custom editors that have been registered with this BeanFactory.

private void
protected abstract Object

Returns:

a new instance of the bean
createBean
(String
the name of the bean
beanName
,
RootBeanDefinition
the merged bean definition for the bean
mbd
,
Object[]
explicit arguments to use for constructor or factory method invocation
args
)

Create a bean instance for the given merged bean definition (and arguments).

public void
destroyBean(String
the name of the bean definition
beanName
,
Object
the bean instance to destroy
beanInstance
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.destroyBean.

Destroy the given bean instance (usually a prototype instance obtained from this factory) according to its bean definition.

protected void
destroyBean(String
the name of the bean definition
beanName
,
Object
the bean instance to destroy
bean
,
RootBeanDefinition
the merged bean definition
mbd
)

Destroy the given bean instance (usually a prototype instance obtained from this factory) according to the given bean definition.

public void
destroyScopedBean(String
the name of the scoped bean
beanName
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.destroyScopedBean.

Destroy the specified scoped bean in the current target scope, if any.

protected <T> T

Returns:

an instance of the bean
doGetBean
(String
the name of the bean to retrieve
name
,
Class<T>
the required type of the bean to retrieve
requiredType
,
Object[]
arguments to use when creating a bean instance using explicit arguments (only applied when creating a new instance as opposed to retrieving an existing one)
args
,
boolean
whether the instance is obtained for a type check, not for actual use
typeCheckOnly
)

Return an instance, which may be shared or independent, of the specified bean.

private Class<?>
doResolveBeanClass(RootBeanDefinition mbd, Class<?>... typesToMatch)

protected Object

Returns:

the resolved value
evaluateBeanDefinitionString
(String
the value to check
value
,
BeanDefinition
the bean definition that the value comes from
beanDefinition
)

Evaluate the given String as contained in a bean definition, potentially resolving it as an expression.

public String[]
getAliases(String
the bean name to check for aliases
name
)

Overrides org.springframework.core.SimpleAliasRegistry.getAliases.

Implements org.springframework.beans.factory.BeanFactory.getAliases, org.springframework.core.AliasRegistry.getAliases.

Return the aliases for the given bean name, if any.

public ApplicationStartup
public Object
getBean(String
the name of the bean to retrieve
name
)

Implements org.springframework.beans.factory.BeanFactory.getBean.

Return an instance, which may be shared or independent, of the specified bean.

public <T> T
getBean(String
the name of the bean to retrieve
name
,
Class<T>
type the bean must match; can be an interface or superclass
requiredType
)

Implements org.springframework.beans.factory.BeanFactory.getBean.

Return an instance, which may be shared or independent, of the specified bean.

public Object
getBean(String
the name of the bean to retrieve
name
,
Object...
arguments to use when creating a bean instance using explicit arguments (only applied when creating a new instance as opposed to retrieving an existing one)
args
)

Implements org.springframework.beans.factory.BeanFactory.getBean.

Return an instance, which may be shared or independent, of the specified bean.

public <T> T

Returns:

an instance of the bean
getBean
(String
the name of the bean to retrieve
name
,
Class<T>
the required type of the bean to retrieve
requiredType
,
Object...
arguments to use when creating a bean instance using explicit arguments (only applied when creating a new instance as opposed to retrieving an existing one)
args
)

Return an instance, which may be shared or independent, of the specified bean.

public ClassLoader
getBeanClassLoader()

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.getBeanClassLoader.

Return this factory's class loader for loading bean classes (only null if even the system ClassLoader isn't accessible).

protected abstract BeanDefinition

Returns:

the BeanDefinition for this prototype name (never null)
getBeanDefinition
(String
the name of the bean to find a definition for
beanName
)

Return the bean definition for the given bean name.

public BeanExpressionResolver
getBeanExpressionResolver()

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.getBeanExpressionResolver.

Return the resolution strategy for expressions in bean definition values.

pack-priv AbstractBeanFactory.BeanPostProcessorCache
getBeanPostProcessorCache()

Return the internal cache of pre-filtered post-processors, freshly (re-)building it if necessary.

public int
getBeanPostProcessorCount()

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.getBeanPostProcessorCount.

Return the current number of registered BeanPostProcessors, if any.

public List<BeanPostProcessor>
getBeanPostProcessors()

Return the list of BeanPostProcessors that will get applied to beans created with this factory.

public ConversionService
public Map<Class<?>, Class<? extends PropertyEditor>>
getCustomEditors()

Return the map of custom editors, with Classes as keys and PropertyEditor classes as values.

protected TypeConverter

Returns:

the custom TypeConverter, or null if none specified
getCustomTypeConverter
()

Return the custom TypeConverter to use, if any.

public BeanDefinition

Returns:

a (potentially merged) RootBeanDefinition for the given bean
getMergedBeanDefinition
(String
the name of the bean to retrieve the merged definition for (may be an alias)
name
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.getMergedBeanDefinition.

Return a 'merged' BeanDefinition for the given bean name, merging a child bean definition with its parent if necessary.

protected RootBeanDefinition

Returns:

a (potentially merged) RootBeanDefinition for the given bean
getMergedBeanDefinition
(String
the name of the bean definition
beanName
,
BeanDefinition
the original bean definition (Root/ChildBeanDefinition)
bd
)

Return a RootBeanDefinition for the given top-level bean, by merging with the parent if the given bean's definition is a child bean definition.

protected RootBeanDefinition

Returns:

a (potentially merged) RootBeanDefinition for the given bean
getMergedBeanDefinition
(String
the name of the bean definition
beanName
,
BeanDefinition
the original bean definition (Root/ChildBeanDefinition)
bd
,
BeanDefinition
the containing bean definition in case of inner bean, or null in case of a top-level bean
containingBd
)

Return a RootBeanDefinition for the given bean, by merging with the parent if the given bean's definition is a child bean definition.

protected RootBeanDefinition

Returns:

a (potentially merged) RootBeanDefinition for the given bean
getMergedLocalBeanDefinition
(String
the name of the bean to retrieve the merged definition for
beanName
)

Return a merged RootBeanDefinition, traversing the parent bean definition if the specified bean corresponds to a child bean definition.

protected Object

Returns:

the object to expose for the bean
getObjectForBeanInstance
(Object
the shared bean instance
beanInstance
,
String
the name that may include factory dereference prefix
name
,
String
the canonical bean name
beanName
,
RootBeanDefinition
the merged bean definition
mbd
)

Get the object for the given bean instance, either the bean instance itself or its created object in case of a FactoryBean.

public BeanFactory
getParentBeanFactory()

Implements org.springframework.beans.factory.HierarchicalBeanFactory.getParentBeanFactory.

Return the parent bean factory, or null if there is none.

public Set<PropertyEditorRegistrar>
getPropertyEditorRegistrars()

Return the set of PropertyEditorRegistrars.

public Scope
getRegisteredScope(String
the name of the scope
scopeName
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.getRegisteredScope.

Return the Scope implementation for the given scope name, if any.

public String[]
public ClassLoader
getTempClassLoader()

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.getTempClassLoader.

Return the temporary ClassLoader to use for type matching purposes, if any.

public Class<?>
getType(String
the name of the bean to query
name
)

Implements org.springframework.beans.factory.BeanFactory.getType.

Determine the type of the bean with the given name.

public Class<?>
getType(String
the name of the bean to query
name
,
boolean
whether a FactoryBean may get initialized just for the purpose of determining its object type
allowFactoryBeanInit
)

Implements org.springframework.beans.factory.BeanFactory.getType.

Determine the type of the bean with the given name.

public TypeConverter
getTypeConverter()

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.getTypeConverter.

Obtain a type converter as used by this BeanFactory.

protected ResolvableType

Returns:

the type for the bean if determinable, otherwise ResolvableType.NONE
getTypeForFactoryBean
(String
the name of the bean
beanName
,
RootBeanDefinition
the merged bean definition for the bean
mbd
,
boolean
if initialization of the FactoryBean is permitted if the type cannot be determined another way
allowInit
)

Determine the bean type for the given FactoryBean definition, as far as possible.

protected boolean
hasBeanCreationStarted()

Check whether this factory's bean creation phase already started, i.e. whether any bean has been marked as created in the meantime.

protected boolean
hasDestructionAwareBeanPostProcessors()

Return whether this factory holds a DestructionAwareBeanPostProcessor that will get applied to singleton beans on shutdown.

public boolean
hasEmbeddedValueResolver()

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.hasEmbeddedValueResolver.

Determine whether an embedded value resolver has been registered with this bean factory, to be applied through resolveEmbeddedValue(String).

protected boolean
hasInstantiationAwareBeanPostProcessors()

Return whether this factory holds a InstantiationAwareBeanPostProcessor that will get applied to singleton beans on creation.

protected void
initBeanWrapper(BeanWrapper
the BeanWrapper to initialize
bw
)

Initialize the given BeanWrapper with the custom editors registered with this factory.

public boolean
protected boolean

Returns:

true if the bean's metadata may be cached at this point already
isBeanEligibleForMetadataCaching
(String
the name of the bean
beanName
)

Determine whether the specified bean is eligible for having its bean definition metadata cached.

public boolean
isBeanNameInUse(String
the name to check
beanName
)

Determine whether the given bean name is already in use within this factory, i.e. whether there is a local bean or alias registered under this name or an inner bean created with this name.

public boolean
isCacheBeanMetadata()

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.isCacheBeanMetadata.

Return whether to cache bean metadata such as given bean definitions (in merged fashion) and resolved bean classes.

public boolean
isFactoryBean(String
the name of the bean to check
name
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.isFactoryBean.

Determine whether the bean with the given name is a FactoryBean.

protected boolean
isFactoryBean(String
the name of the bean
beanName
,
RootBeanDefinition
the corresponding bean definition
mbd
)

Check whether the given bean is defined as a FactoryBean.

public boolean
isPrototype(String
the name of the bean to query
name
)

Implements org.springframework.beans.factory.BeanFactory.isPrototype.

Is this bean a prototype?

protected boolean
isPrototypeCurrentlyInCreation(String
the name of the bean
beanName
)

Return whether the specified prototype bean is currently in creation (within the current thread).

public boolean
isSingleton(String
the name of the bean to query
name
)

Implements org.springframework.beans.factory.BeanFactory.isSingleton.

Is this bean a shared singleton?

public boolean
isTypeMatch(String
the name of the bean to query
name
,
ResolvableType
the type to match against (as a ResolvableType)
typeToMatch
)

Implements org.springframework.beans.factory.BeanFactory.isTypeMatch.

Check whether the bean with the given name matches the specified type.

protected boolean

Returns:

true if the bean type matches, false if it doesn't match or cannot be determined yet
isTypeMatch
(String
the name of the bean to query
name
,
ResolvableType
the type to match against (as a ResolvableType)
typeToMatch
,
boolean allowFactoryBeanInit)

Internal extended variant of isTypeMatch(String, ResolvableType) to check whether the bean with the given name matches the specified type.

public boolean
isTypeMatch(String
the name of the bean to query
name
,
Class<?>
the type to match against (as a Class)
typeToMatch
)

Implements org.springframework.beans.factory.BeanFactory.isTypeMatch.

Check whether the bean with the given name matches the specified type.

protected void
markBeanAsCreated(String
the name of the bean
beanName
)

Mark the specified bean as already created (or about to be created).

protected String

Returns:

the original bean name
originalBeanName
(String
the user-specified name
name
)

Determine the original bean name, resolving locally defined aliases to canonical names.

protected Class<?>

Returns:

the type of the bean, or null if not predictable
predictBeanType
(String
the name of the bean
beanName
,
RootBeanDefinition
the merged bean definition to determine the type for
mbd
,
Class<?>...
the types to match in case of internal type matching purposes (also signals that the returned Class will never be exposed to application code)
typesToMatch
)

Predict the eventual bean type (of the processed bean instance) for the specified bean.

public void
registerCustomEditor(Class<?>
type of the property
requiredType
,
Class<? extends PropertyEditor>
the PropertyEditor class to register
propertyEditorClass
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.registerCustomEditor.

Register the given custom property editor for all properties of the given type.

protected void
registerCustomEditors(PropertyEditorRegistry
the PropertyEditorRegistry to initialize
registry
)

Initialize the given PropertyEditorRegistry with the custom editors that have been registered with this BeanFactory.

protected void
registerDisposableBeanIfNecessary(String
the name of the bean
beanName
,
Object
the bean instance
bean
,
RootBeanDefinition
the bean definition for the bean
mbd
)

Add the given bean to the list of disposable beans in this factory, registering its DisposableBean interface and/or the given destroy method to be called on factory shutdown (if applicable).

public void
registerScope(String
the scope identifier
scopeName
,
Scope
the backing Scope implementation
scope
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.registerScope.

Register the given scope, backed by the given Scope implementation.

protected boolean

Returns:

true if actually removed, false otherwise
removeSingletonIfCreatedForTypeCheckOnly
(String
the name of the bean
beanName
)

Remove the singleton instance (if any) for the given bean name, but only if it hasn't been used for other purposes than type checking.

protected boolean
requiresDestruction(Object
the bean instance to check
bean
,
RootBeanDefinition
the corresponding bean definition
mbd
)

Determine whether the given bean requires destruction on shutdown.

private void
protected Class<?>

Returns:

the resolved bean class (or null if none)
resolveBeanClass
(RootBeanDefinition
the merged bean definition to determine the class for
mbd
,
String
the name of the bean (for error handling purposes)
beanName
,
Class<?>...
the types to match in case of internal type matching purposes (also signals that the returned Class will never be exposed to application code)
typesToMatch
)

Resolve the bean class for the specified bean definition, resolving a bean class name into a Class reference (if necessary) and storing the resolved Class in the bean definition for further use.

public String
resolveEmbeddedValue(String
the value to resolve
value
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.resolveEmbeddedValue.

Resolve the given embedded value, e.g. an annotation attribute.

public void
setApplicationStartup(ApplicationStartup
the new application startup
applicationStartup
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setApplicationStartup.

Set the ApplicationStartup for this bean factory.

public void
setBeanClassLoader(ClassLoader
the class loader to use, or null to suggest the default class loader
beanClassLoader
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setBeanClassLoader.

Set the class loader to use for loading bean classes.

public void
setBeanExpressionResolver(BeanExpressionResolver resolver)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setBeanExpressionResolver.

Specify the resolution strategy for expressions in bean definition values.

public void
setCacheBeanMetadata(boolean cacheBeanMetadata)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setCacheBeanMetadata.

Set whether to cache bean metadata such as given bean definitions (in merged fashion) and resolved bean classes.

public void
setConversionService(ConversionService conversionService)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setConversionService.

Specify a ConversionService to use for converting property values, as an alternative to JavaBeans PropertyEditors.

public void
setParentBeanFactory(BeanFactory
the parent BeanFactory
parentBeanFactory
)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setParentBeanFactory.

Set the parent of this bean factory.

public void
setTempClassLoader(ClassLoader tempClassLoader)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setTempClassLoader.

Specify a temporary ClassLoader to use for type matching purposes.

public void
setTypeConverter(TypeConverter typeConverter)

Implements org.springframework.beans.factory.config.ConfigurableBeanFactory.setTypeConverter.

Set a custom type converter that this BeanFactory should use for converting bean property values, constructor argument values, etc.

This will override the default PropertyEditor mechanism and hence make any custom editors or custom editor registrars irrelevant.

protected String

Returns:

the transformed bean name
transformedBeanName
(String
the user-specified name
name
)

Return the bean name, stripping out the factory dereference prefix if necessary, and resolving aliases to canonical names.

Inherited from org.springframework.beans.factory.support.FactoryBeanRegistrySupport:
clearSingletonCachegetCachedObjectForFactoryBeangetFactoryBeangetFactoryBeanGenericgetObjectFromFactoryBeangetTypeForFactoryBeangetTypeForFactoryBeanFromAttributespostProcessObjectFromFactoryBeanremoveSingleton