Public Methods |
boolean
|
containsBeanDefinition(String beanName)
Check if this bean factory contains a bean definition with the given name.
|
void
|
copyConfigurationFrom(ConfigurableBeanFactory otherFactory)
Copy all relevant configuration from the given other factory.
|
<A extends Annotation>
A
|
findAnnotationOnBean(String beanName, Class<A> annotationType)
Find a Annotation of annotationType on the specified
bean, traversing its interfaces and super classes if no annotation can be
found on the given class itself, as well as checking its raw bean class
if not found on the exposed bean reference (e.g.
|
void
|
freezeConfiguration()
Freeze all bean definitions, signalling that the registered bean definitions
will not be modified or post-processed any further.
|
AutowireCandidateResolver
|
getAutowireCandidateResolver()
Return the autowire candidate resolver for this BeanFactory (never null ).
|
<T>
T
|
getBean(Class<T> requiredType)
Return the bean instance that uniquely matches the given object type, if any.
|
BeanDefinition
|
getBeanDefinition(String beanName)
Return the bean definition for the given bean name.
|
int
|
getBeanDefinitionCount()
Return the number of beans defined in the factory.
|
String[]
|
getBeanDefinitionNames()
Return the names of all beans defined in this factory.
|
String[]
|
getBeanNamesForType(Class type, boolean includeNonSingletons, boolean allowEagerInit)
|
String[]
|
getBeanNamesForType(Class type)
|
<T>
Map<String, T>
|
getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)
Return the bean instances that match the given object type (including
subclasses), judging from either bean definitions or the value of
getObjectType in the case of FactoryBeans.
|
<T>
Map<String, T>
|
getBeansOfType(Class<T> type)
Return the bean instances that match the given object type (including
subclasses), judging from either bean definitions or the value of
getObjectType in the case of FactoryBeans.
|
Map<String, Object>
|
getBeansWithAnnotation(Class<? extends Annotation> annotationType)
Find all beans whose Class has the supplied Annotation type.
|
boolean
|
isAutowireCandidate(String beanName, DependencyDescriptor descriptor)
Determine whether the specified bean qualifies as an autowire candidate,
to be injected into other beans which declare a dependency of matching type.
|
boolean
|
isConfigurationFrozen()
Return whether this factory's bean definitions are frozen,
i.e.
|
void
|
preInstantiateSingletons()
Ensure that all non-lazy-init singletons are instantiated, also considering
FactoryBeans .
|
void
|
registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
Register a new bean definition with this registry.
|
void
|
registerResolvableDependency(Class<?> dependencyType, Object autowiredValue)
Register a special dependency type with corresponding autowired value.
|
void
|
removeBeanDefinition(String beanName)
Remove the BeanDefinition for the given name.
|
Object
|
resolveDependency(DependencyDescriptor descriptor, String beanName, Set<String> autowiredBeanNames, TypeConverter typeConverter)
Resolve the specified dependency against the beans defined in this factory.
|
void
|
setAllowBeanDefinitionOverriding(boolean allowBeanDefinitionOverriding)
Set whether it should be allowed to override bean definitions by registering
a different definition with the same name, automatically replacing the former.
|
void
|
setAllowEagerClassLoading(boolean allowEagerClassLoading)
Set whether the factory is allowed to eagerly load bean classes
even for bean definitions that are marked as "lazy-init".
|
void
|
setAutowireCandidateResolver(AutowireCandidateResolver autowireCandidateResolver)
Set a custom autowire candidate resolver for this BeanFactory to use
when deciding whether a bean definition should be considered as a
candidate for autowiring.
|
void
|
setSerializationId(String serializationId)
Specify an id for serialization purposes, allowing this BeanFactory to be
deserialized from this id back into the BeanFactory object, if needed.
|
String
|
toString()
|
[Expand]
Inherited Methods |
From class
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
Object
|
applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName)
Apply BeanPostProcessors to the given existing bean
instance, invoking their postProcessAfterInitialization methods.
|
Object
|
applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName)
Apply BeanPostProcessors to the given existing bean
instance, invoking their postProcessBeforeInitialization methods.
|
Object
|
applyBeanPostProcessorsBeforeInstantiation(Class beanClass, String beanName)
Apply InstantiationAwareBeanPostProcessors to the specified bean definition
(by class and name), invoking their postProcessBeforeInstantiation methods.
|
void
|
applyBeanPropertyValues(Object existingBean, String beanName)
Apply the property values of the bean definition with the given name to
the given bean instance.
|
void
|
applyMergedBeanDefinitionPostProcessors(RootBeanDefinition mbd, Class beanType, String beanName)
Apply MergedBeanDefinitionPostProcessors to the specified bean definition,
invoking their postProcessMergedBeanDefinition methods.
|
void
|
applyPropertyValues(String beanName, BeanDefinition mbd, BeanWrapper bw, PropertyValues pvs)
Apply the given property values, resolving any runtime references
to other beans in this bean factory.
|
Object
|
autowire(Class beanClass, int autowireMode, boolean dependencyCheck)
Instantiate a new bean instance of the given class with the specified autowire
strategy.
|
void
|
autowireBean(Object existingBean)
Populate the given bean instance through applying after-instantiation callbacks
and bean property post-processing (e.g.
|
void
|
autowireBeanProperties(Object existingBean, int autowireMode, boolean dependencyCheck)
Autowire the bean properties of the given bean instance by name or type.
|
void
|
autowireByName(String beanName, AbstractBeanDefinition mbd, BeanWrapper bw, MutablePropertyValues pvs)
Fill in any missing property values with references to
other beans in this factory if autowire is set to "byName".
|
void
|
autowireByType(String beanName, AbstractBeanDefinition mbd, BeanWrapper bw, MutablePropertyValues pvs)
Abstract method defining "autowire by type" (bean properties by type) behavior.
|
BeanWrapper
|
autowireConstructor(String beanName, RootBeanDefinition mbd, Constructor[] ctors, Object[] explicitArgs)
"autowire constructor" (with constructor arguments by type) behavior.
|
void
|
checkDependencies(String beanName, AbstractBeanDefinition mbd, PropertyDescriptor[] pds, PropertyValues pvs)
Perform a dependency check that all properties exposed have been set,
if desired.
|
Object
|
configureBean(Object existingBean, String beanName)
Configure the given raw bean: autowiring bean properties, applying
bean property values, applying factory callbacks such as setBeanName
and setBeanFactory , and also applying all bean post processors
(including ones which might wrap the given raw bean).
|
void
|
copyConfigurationFrom(ConfigurableBeanFactory otherFactory)
Copy all relevant configuration from the given other factory.
|
<T>
T
|
createBean(Class<T> beanClass)
Fully create a new bean instance of the given class.
|
Object
|
createBean(Class beanClass, int autowireMode, boolean dependencyCheck)
Fully create a new bean instance of the given class with the specified
autowire strategy.
|
Object
|
createBean(String beanName, RootBeanDefinition mbd, Object[] args)
Central method of this class: creates a bean instance,
populates the bean instance, applies post-processors, etc.
|
BeanWrapper
|
createBeanInstance(String beanName, RootBeanDefinition mbd, Object[] args)
Create a new instance for the specified bean, using an appropriate instantiation strategy:
factory method, constructor autowiring, or simple instantiation.
|
Constructor[]
|
determineConstructorsFromBeanPostProcessors(Class beanClass, String beanName)
|
Object
|
doCreateBean(String beanName, RootBeanDefinition mbd, Object[] args)
Actually create the specified bean.
|
PropertyDescriptor[]
|
filterPropertyDescriptorsForDependencyCheck(BeanWrapper bw)
Extract a filtered set of PropertyDescriptors from the given BeanWrapper,
excluding ignored dependency types or properties defined on ignored
dependency interfaces.
|
Object
|
getEarlyBeanReference(String beanName, RootBeanDefinition mbd, Object bean)
Obtain a reference for early access to the specified bean,
typically for the purpose of resolving a circular reference.
|
InstantiationStrategy
|
getInstantiationStrategy()
Return the instantiation strategy to use for creating bean instances.
|
ParameterNameDiscoverer
|
getParameterNameDiscoverer()
Return the ParameterNameDiscoverer to use for resolving method parameter
names if needed.
|
Class
|
getTypeForFactoryBean(String beanName, RootBeanDefinition mbd)
This implementation checks the FactoryBean's getObjectType method
on a plain instance of the FactoryBean, without bean properties applied yet.
|
Class
|
getTypeForFactoryMethod(String beanName, RootBeanDefinition mbd, Class[] typesToMatch)
Determine the bean type for the given bean definition which is based on
a factory method.
|
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.
|
Object
|
initializeBean(String beanName, Object bean, RootBeanDefinition mbd)
Initialize the given bean instance, applying factory callbacks
as well as init methods and bean post processors.
|
Object
|
initializeBean(Object existingBean, String beanName)
Initialize the given raw bean, applying factory callbacks
such as setBeanName and setBeanFactory ,
also applying all bean post processors (including ones which
might wrap the given raw bean).
|
BeanWrapper
|
instantiateBean(String beanName, RootBeanDefinition mbd)
Instantiate the given bean using its default constructor.
|
BeanWrapper
|
instantiateUsingFactoryMethod(String beanName, RootBeanDefinition mbd, Object[] explicitArgs)
Instantiate the bean using a named factory method.
|
void
|
invokeCustomInitMethod(String beanName, Object bean, RootBeanDefinition mbd)
Invoke the specified custom init method on the given bean.
|
void
|
invokeInitMethods(String beanName, Object bean, RootBeanDefinition mbd)
Give a bean a chance to react now all its properties are set,
and a chance to know about its owning bean factory (this object).
|
boolean
|
isExcludedFromDependencyCheck(PropertyDescriptor pd)
Determine whether the given bean property is excluded from dependency checks.
|
void
|
populateBean(String beanName, AbstractBeanDefinition mbd, BeanWrapper bw)
Populate the bean instance in the given BeanWrapper with the property values
from the bean definition.
|
Object
|
postProcessObjectFromFactoryBean(Object object, String beanName)
Applies the postProcessAfterInitialization callback of all
registered BeanPostProcessors, giving them a chance to post-process the
object obtained from FactoryBeans (for example, to auto-proxy them).
|
Class
|
predictBeanType(String beanName, RootBeanDefinition mbd, Class[] typesToMatch)
Predict the eventual bean type (of the processed bean instance) for the
specified bean.
|
void
|
removeSingleton(String beanName)
Overridden to clear FactoryBean instance cache as well.
|
Object
|
resolveBeforeInstantiation(String beanName, RootBeanDefinition mbd)
Apply before-instantiation post-processors, resolving whether there is a
before-instantiation shortcut for the specified bean.
|
Object
|
resolveDependency(DependencyDescriptor descriptor, String beanName)
Resolve the specified dependency against the beans defined in this factory.
|
void
|
setAllowCircularReferences(boolean allowCircularReferences)
Set whether to allow circular references between beans - and automatically
try to resolve them.
|
void
|
setAllowRawInjectionDespiteWrapping(boolean allowRawInjectionDespiteWrapping)
Set whether to allow the raw injection of a bean instance into some other
bean's property, despite the injected bean eventually getting wrapped
(for example, through AOP auto-proxying).
|
void
|
setInstantiationStrategy(InstantiationStrategy instantiationStrategy)
Set the instantiation strategy to use for creating bean instances.
|
void
|
setParameterNameDiscoverer(ParameterNameDiscoverer parameterNameDiscoverer)
Set the ParameterNameDiscoverer to use for resolving method parameter
names if needed (e.g.
|
String[]
|
unsatisfiedNonSimpleProperties(AbstractBeanDefinition mbd, BeanWrapper bw)
Return an array of non-simple bean properties that are unsatisfied.
|
|
From class
org.springframework.beans.factory.support.AbstractBeanFactory
void
|
addBeanPostProcessor(BeanPostProcessor beanPostProcessor)
Add a new BeanPostProcessor that will get applied to beans created
by this factory.
|
void
|
addEmbeddedValueResolver(StringValueResolver valueResolver)
Add a String resolver for embedded values such as annotation attributes.
|
void
|
addPropertyEditorRegistrar(PropertyEditorRegistrar registrar)
Add a PropertyEditorRegistrar to be applied to all bean creation processes.
|
void
|
afterPrototypeCreation(String beanName)
Callback after prototype creation.
|
void
|
beforePrototypeCreation(String beanName)
Callback before prototype creation.
|
void
|
checkMergedBeanDefinition(RootBeanDefinition mbd, String beanName, Object[] args)
Check the given merged bean definition,
potentially throwing validation exceptions.
|
void
|
clearMergedBeanDefinition(String beanName)
Remove the merged bean definition for the specified bean,
recreating it on next access.
|
boolean
|
containsBean(String name)
Does this bean factory contain a bean with the given name? More specifically,
is getBean(Class) able to obtain a bean instance for the given name?
Translates aliases back to the corresponding canonical bean name.
|
abstract
boolean
|
containsBeanDefinition(String beanName)
Check if this bean factory contains a bean definition with the given name.
|
boolean
|
containsLocalBean(String name)
Return whether the local bean factory contains a bean of the given name,
ignoring beans defined in ancestor contexts.
|
void
|
copyConfigurationFrom(ConfigurableBeanFactory otherFactory)
Copy all relevant configuration from the given other factory.
|
void
|
copyRegisteredEditorsTo(PropertyEditorRegistry registry)
Initialize the given PropertyEditorRegistry with the custom editors
that have been registered with this BeanFactory.
|
abstract
Object
|
createBean(String beanName, RootBeanDefinition mbd, Object[] args)
Create a bean instance for the given bean definition.
|
void
|
destroyBean(String beanName, Object beanInstance, RootBeanDefinition mbd)
Destroy the given bean instance (usually a prototype instance
obtained from this factory) according to the given bean definition.
|
void
|
destroyBean(String beanName, Object beanInstance)
Destroy the given bean instance (usually a prototype instance
obtained from this factory) according to its bean definition.
|
void
|
destroyScopedBean(String beanName)
Destroy the specified scoped bean in the current target scope, if any.
|
<T>
T
|
doGetBean(String name, Class<T> requiredType, Object[] args, boolean typeCheckOnly)
Return an instance, which may be shared or independent, of the specified bean.
|
Object
|
evaluateBeanDefinitionString(String value, BeanDefinition beanDefinition)
Evaluate the given String as contained in a bean definition,
potentially resolving it as an expression.
|
AccessControlContext
|
getAccessControlContext()
|
String[]
|
getAliases(String name)
Return the aliases for the given name, if defined.
|
<T>
T
|
getBean(String name, Class<T> requiredType, Object... args)
Return an instance, which may be shared or independent, of the specified bean.
|
Object
|
getBean(String name, Object... args)
Return an instance, which may be shared or independent, of the specified bean.
|
<T>
T
|
getBean(String name, Class<T> requiredType)
Return an instance, which may be shared or independent, of the specified bean.
|
Object
|
getBean(String name)
Return an instance, which may be shared or independent, of the specified bean.
|
ClassLoader
|
getBeanClassLoader()
Return this factory's class loader for loading bean classes.
|
abstract
BeanDefinition
|
getBeanDefinition(String beanName)
Return the bean definition for the given bean name.
|
BeanExpressionResolver
|
getBeanExpressionResolver()
Return the resolution strategy for expressions in bean definition values.
|
int
|
getBeanPostProcessorCount()
Return the current number of registered BeanPostProcessors, if any.
|
List<BeanPostProcessor>
|
getBeanPostProcessors()
Return the list of BeanPostProcessors that will get applied
to beans created with this factory.
|
ConversionService
|
getConversionService()
Return the associated ConversionService, if any.
|
Map<Class, Class<? extends PropertyEditor>>
|
getCustomEditors()
Return the map of custom editors, with Classes as keys and PropertyEditor classes as values.
|
TypeConverter
|
getCustomTypeConverter()
Return the custom TypeConverter to use, if any.
|
RootBeanDefinition
|
getMergedBeanDefinition(String beanName, BeanDefinition 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.
|
BeanDefinition
|
getMergedBeanDefinition(String name)
Return a 'merged' BeanDefinition for the given bean name,
merging a child bean definition with its parent if necessary.
|
RootBeanDefinition
|
getMergedBeanDefinition(String beanName, BeanDefinition bd, BeanDefinition containingBd)
Return a RootBeanDefinition for the given bean, by merging with the
parent if the given bean's definition is a child bean definition.
|
RootBeanDefinition
|
getMergedLocalBeanDefinition(String beanName)
Return a merged RootBeanDefinition, traversing the parent bean definition
if the specified bean corresponds to a child bean definition.
|
Object
|
getObjectForBeanInstance(Object beanInstance, String name, String beanName, RootBeanDefinition mbd)
Get the object for the given bean instance, either the bean
instance itself or its created object in case of a FactoryBean.
|
BeanFactory
|
getParentBeanFactory()
Return the parent bean factory, or null if there is none.
|
Set<PropertyEditorRegistrar>
|
getPropertyEditorRegistrars()
Return the set of PropertyEditorRegistrars.
|
Scope
|
getRegisteredScope(String scopeName)
Return the Scope implementation for the given scope name, if any.
|
String[]
|
getRegisteredScopeNames()
Return the names of all currently registered scopes.
|
ClassLoader
|
getTempClassLoader()
Return the temporary ClassLoader to use for type matching purposes,
if any.
|
Class<?>
|
getType(String name)
Determine the type of the bean with the given name.
|
TypeConverter
|
getTypeConverter()
Obtain a type converter as used by this BeanFactory.
|
Class
|
getTypeForFactoryBean(String beanName, RootBeanDefinition mbd)
Determine the bean type for the given FactoryBean definition, as far as possible.
|
boolean
|
hasDestructionAwareBeanPostProcessors()
Return whether this factory holds a DestructionAwareBeanPostProcessor
that will get applied to singleton beans on shutdown.
|
boolean
|
hasInstantiationAwareBeanPostProcessors()
Return whether this factory holds a InstantiationAwareBeanPostProcessor
that will get applied to singleton beans on shutdown.
|
void
|
initBeanWrapper(BeanWrapper bw)
Initialize the given BeanWrapper with the custom editors registered
with this factory.
|
boolean
|
isBeanEligibleForMetadataCaching(String beanName)
Determine whether the specified bean is eligible for having
its bean definition metadata cached.
|
boolean
|
isBeanNameInUse(String beanName)
Determine whether the given bean name is already in use within this factory,
i.e.
|
boolean
|
isCacheBeanMetadata()
Return whether to cache bean metadata such as given bean definitions
(in merged fashion) and resolved bean classes.
|
boolean
|
isCurrentlyInCreation(String beanName)
Determine whether the specified bean is currently in creation.
|
boolean
|
isFactoryBean(String beanName, RootBeanDefinition mbd)
Check whether the given bean is defined as a FactoryBean .
|
boolean
|
isFactoryBean(String name)
Determine whether the bean with the given name is a FactoryBean.
|
boolean
|
isPrototype(String name)
Is this bean a prototype? That is, will getBean(Class) always return
independent instances?
Note: This method returning false does not clearly indicate
a singleton object.
|
final
boolean
|
isPrototypeCurrentlyInCreation(String beanName)
Return whether the specified prototype bean is currently in creation
(within the current thread).
|
boolean
|
isSingleton(String name)
Is this bean a shared singleton? That is, will getBean(Class) always
return the same instance?
Note: This method returning false does not clearly indicate
independent instances.
|
boolean
|
isTypeMatch(String name, Class targetType)
|
void
|
markBeanAsCreated(String beanName)
Mark the specified bean as already created (or about to be created).
|
String
|
originalBeanName(String name)
Determine the original bean name, resolving locally defined aliases to canonical names.
|
Class
|
predictBeanType(String beanName, RootBeanDefinition mbd, Class... typesToMatch)
Predict the eventual bean type (of the processed bean instance) for the
specified bean.
|
void
|
registerCustomEditor(Class<?> requiredType, Class<? extends PropertyEditor> propertyEditorClass)
Register the given custom property editor for all properties of the
given type.
|
void
|
registerCustomEditors(PropertyEditorRegistry registry)
Initialize the given PropertyEditorRegistry with the custom editors
that have been registered with this BeanFactory.
|
void
|
registerDisposableBeanIfNecessary(String beanName, Object bean, RootBeanDefinition 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).
|
void
|
registerScope(String scopeName, Scope scope)
Register the given scope, backed by the given Scope implementation.
|
boolean
|
removeSingletonIfCreatedForTypeCheckOnly(String 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.
|
boolean
|
requiresDestruction(Object bean, RootBeanDefinition mbd)
Determine whether the given bean requires destruction on shutdown.
|
Class
|
resolveBeanClass(RootBeanDefinition mbd, String beanName, Class... 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.
|
String
|
resolveEmbeddedValue(String value)
Resolve the given embedded value, e.g.
|
void
|
setBeanClassLoader(ClassLoader beanClassLoader)
Set the class loader to use for loading bean classes.
|
void
|
setBeanExpressionResolver(BeanExpressionResolver resolver)
Specify the resolution strategy for expressions in bean definition values.
|
void
|
setCacheBeanMetadata(boolean cacheBeanMetadata)
Set whether to cache bean metadata such as given bean definitions
(in merged fashion) and resolved bean classes.
|
void
|
setConversionService(ConversionService conversionService)
Specify a Spring 3.0 ConversionService to use for converting
property values, as an alternative to JavaBeans PropertyEditors.
|
void
|
setParentBeanFactory(BeanFactory parentBeanFactory)
Set the parent of this bean factory.
|
void
|
setSecurityContextProvider(SecurityContextProvider securityProvider)
Set the security context provider for this bean factory.
|
void
|
setTempClassLoader(ClassLoader tempClassLoader)
Specify a temporary ClassLoader to use for type matching purposes.
|
void
|
setTypeConverter(TypeConverter typeConverter)
Set a custom type converter that this BeanFactory should use for converting
bean property values, constructor argument values, etc.
|
String
|
transformedBeanName(String name)
Return the bean name, stripping out the factory dereference prefix if necessary,
and resolving aliases to canonical names.
|
|
From class
org.springframework.beans.factory.support.FactoryBeanRegistrySupport
|
From class
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
void
|
addSingleton(String beanName, Object singletonObject)
Add the given singleton object to the singleton cache of this factory.
|
void
|
addSingletonFactory(String beanName, ObjectFactory singletonFactory)
Add the given singleton factory for building the specified singleton
if necessary.
|
void
|
afterSingletonCreation(String beanName)
Callback after singleton creation.
|
void
|
beforeSingletonCreation(String beanName)
Callback before singleton creation.
|
boolean
|
containsSingleton(String beanName)
Check if this registry contains a singleton instance with the given name.
|
void
|
destroyBean(String beanName, DisposableBean bean)
Destroy the given bean.
|
void
|
destroySingleton(String beanName)
Destroy the given bean.
|
void
|
destroySingletons()
|
String[]
|
getDependenciesForBean(String beanName)
Return the names of all beans that the specified bean depends on, if any.
|
String[]
|
getDependentBeans(String beanName)
Return the names of all beans which depend on the specified bean, if any.
|
Object
|
getSingleton(String beanName, ObjectFactory singletonFactory)
Return the (raw) singleton object registered under the given name,
creating and registering a new one if none registered yet.
|
Object
|
getSingleton(String beanName, boolean allowEarlyReference)
Return the (raw) singleton object registered under the given name.
|
Object
|
getSingleton(String beanName)
Return the (raw) singleton object registered under the given name.
|
int
|
getSingletonCount()
Return the number of singleton beans registered in this registry.
|
final
Object
|
getSingletonMutex()
Expose the singleton mutex to subclasses.
|
String[]
|
getSingletonNames()
Return the names of singleton beans registered in this registry.
|
boolean
|
hasDependentBean(String beanName)
Determine whether a dependent bean has been registered for the given name.
|
final
boolean
|
isSingletonCurrentlyInCreation(String beanName)
Return whether the specified singleton bean is currently in creation
(within the entire factory).
|
void
|
onSuppressedException(Exception ex)
Register an Exception that happened to get suppressed during the creation of a
singleton bean instance, e.g.
|
void
|
registerContainedBean(String containedBeanName, String containingBeanName)
Register a containment relationship between two beans,
e.g.
|
void
|
registerDependentBean(String beanName, String dependentBeanName)
Register a dependent bean for the given bean,
to be destroyed before the given bean is destroyed.
|
void
|
registerDisposableBean(String beanName, DisposableBean bean)
Add the given bean to the list of disposable beans in this registry.
|
void
|
registerSingleton(String beanName, Object singletonObject)
Register the given existing object as singleton in the bean registry,
under the given bean name.
|
void
|
removeSingleton(String beanName)
Remove the bean with the given name from the singleton cache of this factory,
to be able to clean up eager registration of a singleton if creation failed.
|
|
From class
org.springframework.core.SimpleAliasRegistry
boolean
|
allowAliasOverriding()
Return whether alias overriding is allowed.
|
String
|
canonicalName(String name)
Determine the raw name, resolving aliases to canonical names.
|
void
|
checkForAliasCircle(String name, String alias)
Check whether the given name points back to given alias as an alias
in the other direction, catching a circular reference upfront and
throwing a corresponding IllegalStateException.
|
String[]
|
getAliases(String name)
Return the aliases for the given name, if defined.
|
boolean
|
isAlias(String name)
Determine whether this given name is defines as an alias
(as opposed to the name of an actually registered component).
|
void
|
registerAlias(String name, String alias)
Given a name, register an alias for it.
|
void
|
removeAlias(String alias)
Remove the specified alias from this registry.
|
void
|
resolveAliases(StringValueResolver valueResolver)
Resolve all alias target names and aliases registered in this
factory, applying the given StringValueResolver to them.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.beans.factory.BeanFactory
abstract
boolean
|
containsBean(String name)
Does this bean factory contain a bean with the given name? More specifically,
is getBean(Class) able to obtain a bean instance for the given name?
Translates aliases back to the corresponding canonical bean name.
|
abstract
String[]
|
getAliases(String name)
Return the aliases for the given bean name, if any.
|
abstract
Object
|
getBean(String name)
Return an instance, which may be shared or independent, of the specified bean.
|
abstract
Object
|
getBean(String name, Object... args)
Return an instance, which may be shared or independent, of the specified bean.
|
abstract
<T>
T
|
getBean(Class<T> requiredType)
Return the bean instance that uniquely matches the given object type, if any.
|
abstract
<T>
T
|
getBean(String name, Class<T> requiredType)
Return an instance, which may be shared or independent, of the specified bean.
|
abstract
Class<?>
|
getType(String name)
Determine the type of the bean with the given name.
|
abstract
boolean
|
isPrototype(String name)
Is this bean a prototype? That is, will getBean(Class) always return
independent instances?
Note: This method returning false does not clearly indicate
a singleton object.
|
abstract
boolean
|
isSingleton(String name)
Is this bean a shared singleton? That is, will getBean(Class) always
return the same instance?
Note: This method returning false does not clearly indicate
independent instances.
|
abstract
boolean
|
isTypeMatch(String name, Class<?> targetType)
Check whether the bean with the given name matches the specified type.
|
|
From interface
org.springframework.beans.factory.HierarchicalBeanFactory
|
From interface
org.springframework.beans.factory.ListableBeanFactory
abstract
boolean
|
containsBeanDefinition(String beanName)
Check if this bean factory contains a bean definition with the given name.
|
abstract
<A extends Annotation>
A
|
findAnnotationOnBean(String beanName, Class<A> annotationType)
Find a Annotation of annotationType on the specified
bean, traversing its interfaces and super classes if no annotation can be
found on the given class itself.
|
abstract
int
|
getBeanDefinitionCount()
Return the number of beans defined in the factory.
|
abstract
String[]
|
getBeanDefinitionNames()
Return the names of all beans defined in this factory.
|
abstract
String[]
|
getBeanNamesForType(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit)
Return the names of beans matching the given type (including subclasses),
judging from either bean definitions or the value of getObjectType
in the case of FactoryBeans.
|
abstract
String[]
|
getBeanNamesForType(Class<?> type)
Return the names of beans matching the given type (including subclasses),
judging from either bean definitions or the value of getObjectType
in the case of FactoryBeans.
|
abstract
<T>
Map<String, T>
|
getBeansOfType(Class<T> type)
Return the bean instances that match the given object type (including
subclasses), judging from either bean definitions or the value of
getObjectType in the case of FactoryBeans.
|
abstract
<T>
Map<String, T>
|
getBeansOfType(Class<T> type, boolean includeNonSingletons, boolean allowEagerInit)
Return the bean instances that match the given object type (including
subclasses), judging from either bean definitions or the value of
getObjectType in the case of FactoryBeans.
|
abstract
Map<String, Object>
|
getBeansWithAnnotation(Class<? extends Annotation> annotationType)
Find all beans whose Class has the supplied Annotation type.
|
|
From interface
org.springframework.beans.factory.config.AutowireCapableBeanFactory
abstract
Object
|
applyBeanPostProcessorsAfterInitialization(Object existingBean, String beanName)
Apply BeanPostProcessors to the given existing bean
instance, invoking their postProcessAfterInitialization methods.
|
abstract
Object
|
applyBeanPostProcessorsBeforeInitialization(Object existingBean, String beanName)
Apply BeanPostProcessors to the given existing bean
instance, invoking their postProcessBeforeInitialization methods.
|
abstract
void
|
applyBeanPropertyValues(Object existingBean, String beanName)
Apply the property values of the bean definition with the given name to
the given bean instance.
|
abstract
Object
|
autowire(Class beanClass, int autowireMode, boolean dependencyCheck)
Instantiate a new bean instance of the given class with the specified autowire
strategy.
|
abstract
void
|
autowireBean(Object existingBean)
Populate the given bean instance through applying after-instantiation callbacks
and bean property post-processing (e.g.
|
abstract
void
|
autowireBeanProperties(Object existingBean, int autowireMode, boolean dependencyCheck)
Autowire the bean properties of the given bean instance by name or type.
|
abstract
Object
|
configureBean(Object existingBean, String beanName)
Configure the given raw bean: autowiring bean properties, applying
bean property values, applying factory callbacks such as setBeanName
and setBeanFactory , and also applying all bean post processors
(including ones which might wrap the given raw bean).
|
abstract
Object
|
createBean(Class beanClass, int autowireMode, boolean dependencyCheck)
Fully create a new bean instance of the given class with the specified
autowire strategy.
|
abstract
<T>
T
|
createBean(Class<T> beanClass)
Fully create a new bean instance of the given class.
|
abstract
Object
|
initializeBean(Object existingBean, String beanName)
Initialize the given raw bean, applying factory callbacks
such as setBeanName and setBeanFactory ,
also applying all bean post processors (including ones which
might wrap the given raw bean).
|
abstract
Object
|
resolveDependency(DependencyDescriptor descriptor, String beanName)
Resolve the specified dependency against the beans defined in this factory.
|
abstract
Object
|
resolveDependency(DependencyDescriptor descriptor, String beanName, Set<String> autowiredBeanNames, TypeConverter typeConverter)
Resolve the specified dependency against the beans defined in this factory.
|
|
From interface
org.springframework.beans.factory.config.ConfigurableBeanFactory
abstract
void
|
addBeanPostProcessor(BeanPostProcessor beanPostProcessor)
Add a new BeanPostProcessor that will get applied to beans created
by this factory.
|
abstract
void
|
addEmbeddedValueResolver(StringValueResolver valueResolver)
Add a String resolver for embedded values such as annotation attributes.
|
abstract
void
|
addPropertyEditorRegistrar(PropertyEditorRegistrar registrar)
Add a PropertyEditorRegistrar to be applied to all bean creation processes.
|
abstract
void
|
copyConfigurationFrom(ConfigurableBeanFactory otherFactory)
Copy all relevant configuration from the given other factory.
|
abstract
void
|
copyRegisteredEditorsTo(PropertyEditorRegistry registry)
Initialize the given PropertyEditorRegistry with the custom editors
that have been registered with this BeanFactory.
|
abstract
void
|
destroyBean(String beanName, Object beanInstance)
Destroy the given bean instance (usually a prototype instance
obtained from this factory) according to its bean definition.
|
abstract
void
|
destroyScopedBean(String beanName)
Destroy the specified scoped bean in the current target scope, if any.
|
abstract
void
|
destroySingletons()
Destroy all singleton beans in this factory, including inner beans that have
been registered as disposable.
|
abstract
AccessControlContext
|
getAccessControlContext()
Provides a security access control context relevant to this factory.
|
abstract
ClassLoader
|
getBeanClassLoader()
Return this factory's class loader for loading bean classes.
|
abstract
BeanExpressionResolver
|
getBeanExpressionResolver()
Return the resolution strategy for expressions in bean definition values.
|
abstract
int
|
getBeanPostProcessorCount()
Return the current number of registered BeanPostProcessors, if any.
|
abstract
ConversionService
|
getConversionService()
Return the associated ConversionService, if any.
|
abstract
String[]
|
getDependenciesForBean(String beanName)
Return the names of all beans that the specified bean depends on, if any.
|
abstract
String[]
|
getDependentBeans(String beanName)
Return the names of all beans which depend on the specified bean, if any.
|
abstract
BeanDefinition
|
getMergedBeanDefinition(String beanName)
Return a merged BeanDefinition for the given bean name,
merging a child bean definition with its parent if necessary.
|
abstract
Scope
|
getRegisteredScope(String scopeName)
Return the Scope implementation for the given scope name, if any.
|
abstract
String[]
|
getRegisteredScopeNames()
Return the names of all currently registered scopes.
|
abstract
ClassLoader
|
getTempClassLoader()
Return the temporary ClassLoader to use for type matching purposes,
if any.
|
abstract
TypeConverter
|
getTypeConverter()
Obtain a type converter as used by this BeanFactory.
|
abstract
boolean
|
isCacheBeanMetadata()
Return whether to cache bean metadata such as given bean definitions
(in merged fashion) and resolved bean classes.
|
abstract
boolean
|
isCurrentlyInCreation(String beanName)
Determine whether the specified bean is currently in creation.
|
abstract
boolean
|
isFactoryBean(String name)
Determine whether the bean with the given name is a FactoryBean.
|
abstract
void
|
registerAlias(String beanName, String alias)
Given a bean name, create an alias.
|
abstract
void
|
registerCustomEditor(Class<?> requiredType, Class<? extends PropertyEditor> propertyEditorClass)
Register the given custom property editor for all properties of the
given type.
|
abstract
void
|
registerDependentBean(String beanName, String dependentBeanName)
Register a dependent bean for the given bean,
to be destroyed before the given bean is destroyed.
|
abstract
void
|
registerScope(String scopeName, Scope scope)
Register the given scope, backed by the given Scope implementation.
|
abstract
void
|
resolveAliases(StringValueResolver valueResolver)
Resolve all alias target names and aliases registered in this
factory, applying the given StringValueResolver to them.
|
abstract
String
|
resolveEmbeddedValue(String value)
Resolve the given embedded value, e.g.
|
abstract
void
|
setBeanClassLoader(ClassLoader beanClassLoader)
Set the class loader to use for loading bean classes.
|
abstract
void
|
setBeanExpressionResolver(BeanExpressionResolver resolver)
Specify the resolution strategy for expressions in bean definition values.
|
abstract
void
|
setCacheBeanMetadata(boolean cacheBeanMetadata)
Set whether to cache bean metadata such as given bean definitions
(in merged fashion) and resolved bean classes.
|
abstract
void
|
setConversionService(ConversionService conversionService)
Specify a Spring 3.0 ConversionService to use for converting
property values, as an alternative to JavaBeans PropertyEditors.
|
abstract
void
|
setParentBeanFactory(BeanFactory parentBeanFactory)
Set the parent of this bean factory.
|
abstract
void
|
setTempClassLoader(ClassLoader tempClassLoader)
Specify a temporary ClassLoader to use for type matching purposes.
|
abstract
void
|
setTypeConverter(TypeConverter typeConverter)
Set a custom type converter that this BeanFactory should use for converting
bean property values, constructor argument values, etc.
|
|
From interface
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
abstract
void
|
freezeConfiguration()
Freeze all bean definitions, signalling that the registered bean definitions
will not be modified or post-processed any further.
|
abstract
BeanDefinition
|
getBeanDefinition(String beanName)
Return the registered BeanDefinition for the specified bean, allowing access
to its property values and constructor argument value (which can be
modified during bean factory post-processing).
|
abstract
void
|
ignoreDependencyInterface(Class<?> ifc)
Ignore the given dependency interface for autowiring.
|
abstract
void
|
ignoreDependencyType(Class<?> type)
Ignore the given dependency type for autowiring:
for example, String.
|
abstract
boolean
|
isAutowireCandidate(String beanName, DependencyDescriptor descriptor)
Determine whether the specified bean qualifies as an autowire candidate,
to be injected into other beans which declare a dependency of matching type.
|
abstract
boolean
|
isConfigurationFrozen()
Return whether this factory's bean definitions are frozen,
i.e.
|
abstract
void
|
preInstantiateSingletons()
Ensure that all non-lazy-init singletons are instantiated, also considering
FactoryBeans .
|
abstract
void
|
registerResolvableDependency(Class<?> dependencyType, Object autowiredValue)
Register a special dependency type with corresponding autowired value.
|
|
From interface
org.springframework.beans.factory.config.SingletonBeanRegistry
abstract
boolean
|
containsSingleton(String beanName)
Check if this registry contains a singleton instance with the given name.
|
abstract
Object
|
getSingleton(String beanName)
Return the (raw) singleton object registered under the given name.
|
abstract
int
|
getSingletonCount()
Return the number of singleton beans registered in this registry.
|
abstract
String[]
|
getSingletonNames()
Return the names of singleton beans registered in this registry.
|
abstract
void
|
registerSingleton(String beanName, Object singletonObject)
Register the given existing object as singleton in the bean registry,
under the given bean name.
|
|
From interface
org.springframework.beans.factory.support.BeanDefinitionRegistry
|
From interface
org.springframework.core.AliasRegistry
abstract
String[]
|
getAliases(String name)
Return the aliases for the given name, if defined.
|
abstract
boolean
|
isAlias(String beanName)
Determine whether this given name is defines as an alias
(as opposed to the name of an actually registered component).
|
abstract
void
|
registerAlias(String name, String alias)
Given a name, register an alias for it.
|
abstract
void
|
removeAlias(String alias)
Remove the specified alias from this registry.
|
|