Class DefaultBeanNameGenerator
java.lang.Object
org.springframework.beans.factory.support.DefaultBeanNameGenerator
- All Implemented Interfaces:
BeanNameGenerator
Default implementation of the
BeanNameGenerator
interface, delegating to
BeanDefinitionReaderUtils.generateBeanName(BeanDefinition, BeanDefinitionRegistry)
.- Since:
- 2.0.3
- Author:
- Juergen Hoeller
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DefaultBeanNameGenerator
A convenient constant for a defaultDefaultBeanNameGenerator
instance, as used forAbstractBeanDefinitionReader
setup. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateBeanName
(BeanDefinition definition, BeanDefinitionRegistry registry) Generate a bean name for the given bean definition.
-
Field Details
-
INSTANCE
A convenient constant for a defaultDefaultBeanNameGenerator
instance, as used forAbstractBeanDefinitionReader
setup.- Since:
- 5.2
-
-
Constructor Details
-
DefaultBeanNameGenerator
public DefaultBeanNameGenerator()
-
-
Method Details
-
generateBeanName
Description copied from interface:BeanNameGenerator
Generate a bean name for the given bean definition.- Specified by:
generateBeanName
in interfaceBeanNameGenerator
- Parameters:
definition
- the bean definition to generate a name forregistry
- the bean definition registry that the given definition is supposed to be registered with- Returns:
- the generated bean name
-