code: @Override
  	public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
  
  		Map<String, Object> annotationAttributes = importingClassMetadata
  				.getAnnotationAttributes(EnablePluginRegistries.class.getName());
  
  		if (annotationAttributes == null) {
  			LOG.info("No EnablePluginRegistries annotation found on type {}!", importingClassMetadata.getClassName());
  			return;
  		}
  
  		Class<?>[] types = (Class<?>[]) annotationAttributes.get("value");
  
  		for (Class<?> type : types) {
  
  			BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(PluginRegistryFactoryBean.class);
  			builder.addPropertyValue("type", type);
  
  			RootBeanDefinition beanDefinition = (RootBeanDefinition) builder.getBeanDefinition();
  			beanDefinition.setTargetType(getTargetType(type));
  
  			Qualifier annotation = type.getAnnotation(Qualifier.class);
  
  			// If the plugin interface has a Qualifier annotation, propagate that to the bean definition of the registry
  			if (annotation != null) {
  				AutowireCandidateQualifier qualifierMetadata = new AutowireCandidateQualifier(Qualifier.class);
  				qualifierMetadata.setAttribute(AutowireCandidateQualifier.VALUE_KEY, annotation.value());
  				beanDefinition.addQualifier(qualifierMetadata);
  			}
  
  			// Default
  			String beanName = annotation == null //
  					? StringUtils.uncapitalize(type.getSimpleName() + "Registry") //
  					: annotation.value();
  
  			registry.registerBeanDefinition(beanName, builder.getBeanDefinition());
  		}
  	}
docs: /*
  (non-Javadoc)
  @see org.springframework.context.annotation.ImportBeanDefinitionRegistrar#registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry)