Check if this registry contains a singleton instance with the given name.
Only checks already instantiated singletons; does not return true
for singleton bean definitions which have not been instantiated yet.
The main purpose of this method is to check manually registered singletons
(see
SingletonBeanRegistry.registerSingleton ). Can also be used to check whether a
singleton defined by a bean definition has already been created.
To check whether a bean factory contains a bean definition with a given name,
use ListableBeanFactory's containsBeanDefinition . Calling both
containsBeanDefinition and containsSingleton answers
whether a specific bean factory contains an own bean with the given name.
Use BeanFactory's containsBean for general checks whether the
factory knows about a bean with a given name (whether manually registered singleton
instance or created by bean definition), also checking ancestor factories.
Parameters: beanName - the name of the bean to look for if this bean factory contains a singleton instance with the given name See Also: SingletonBeanRegistry.registerSingleton See Also: org.springframework.beans.factory.ListableBeanFactory.containsBeanDefinition See Also: org.springframework.beans.factory.BeanFactory.containsBean |