1 16 17 package org.springframework.beans.factory.support; 18 19 import org.springframework.beans.factory.config.BeanDefinition; 20 21 31 public class DefaultBeanNameGenerator implements BeanNameGenerator { 32 33 public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) { 34 if (!(definition instanceof AbstractBeanDefinition)) { 35 throw new IllegalArgumentException ( 36 "DefaultBeanNameGenerator is only able to handle AbstractBeanDefinition subclasses: " + definition); 37 } 38 return BeanDefinitionReaderUtils.generateBeanName((AbstractBeanDefinition) definition, registry); 39 } 40 41 } 42 | Popular Tags |