Search in sources :

Example 6 with BeanNameGenerator

use of org.springframework.beans.factory.support.BeanNameGenerator in project spring-framework by spring-projects.

the class ComponentScanBeanDefinitionParser method parseBeanNameGenerator.

protected void parseBeanNameGenerator(Element element, ClassPathBeanDefinitionScanner scanner) {
    if (element.hasAttribute(NAME_GENERATOR_ATTRIBUTE)) {
        BeanNameGenerator beanNameGenerator = (BeanNameGenerator) instantiateUserDefinedStrategy(element.getAttribute(NAME_GENERATOR_ATTRIBUTE), BeanNameGenerator.class, scanner.getResourceLoader().getClassLoader());
        scanner.setBeanNameGenerator(beanNameGenerator);
    }
}
Also used : BeanNameGenerator(org.springframework.beans.factory.support.BeanNameGenerator)

Aggregations

BeanNameGenerator (org.springframework.beans.factory.support.BeanNameGenerator)6 LinkedHashSet (java.util.LinkedHashSet)2 Test (org.junit.Test)2 DefaultBeanNameGenerator (org.springframework.beans.factory.support.DefaultBeanNameGenerator)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 BeanDefinition (org.springframework.beans.factory.config.BeanDefinition)1 BeanDefinitionHolder (org.springframework.beans.factory.config.BeanDefinitionHolder)1 SingletonBeanRegistry (org.springframework.beans.factory.config.SingletonBeanRegistry)1 AbstractBeanDefinition (org.springframework.beans.factory.support.AbstractBeanDefinition)1 AnnotatedBeanDefinitionReader (org.springframework.context.annotation.AnnotatedBeanDefinitionReader)1 ClassPathBeanDefinitionScanner (org.springframework.context.annotation.ClassPathBeanDefinitionScanner)1 ScopeMetadataResolver (org.springframework.context.annotation.ScopeMetadataResolver)1 AnnotationAttributes (org.springframework.core.annotation.AnnotationAttributes)1 CachingMetadataReaderFactory (org.springframework.core.type.classreading.CachingMetadataReaderFactory)1 AbstractTypeHierarchyTraversingFilter (org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter)1 AnnotationTypeFilter (org.springframework.core.type.filter.AnnotationTypeFilter)1 AspectJTypeFilter (org.springframework.core.type.filter.AspectJTypeFilter)1 AssignableTypeFilter (org.springframework.core.type.filter.AssignableTypeFilter)1 RegexPatternTypeFilter (org.springframework.core.type.filter.RegexPatternTypeFilter)1