Package org.springframework.data.config
Class BeanComponentDefinitionBuilder
java.lang.Object
org.springframework.data.config.BeanComponentDefinitionBuilder
Helper to create 
BeanComponentDefinition more easily.- Author:
- Oliver Gierke
- 
Constructor SummaryConstructorsConstructorDescriptionBeanComponentDefinitionBuilder(Element defaultSource, ParserContext context) Creates a newBeanComponentDefinitionBuilderusing the givenElementas default source and the givenParserContext.
- 
Method SummaryModifier and TypeMethodDescriptiongetComponent(BeanDefinitionBuilder builder) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilder.getComponent(BeanDefinitionBuilder builder, String name) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilderusing the given name.getComponent(BeanDefinitionBuilder builder, String name, Object rawSource) Creates a newBeanComponentDefinitionfrom the givenBeanDefinitionBuilderusing the given name and raw source object.getComponentIdButFallback(BeanDefinitionBuilder builder, String fallback) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilderand inspects the backingElements id attribute for a name.
- 
Constructor Details- 
BeanComponentDefinitionBuilderCreates a newBeanComponentDefinitionBuilderusing the givenElementas default source and the givenParserContext.- Parameters:
- defaultSource- must not be null.
- context- must not be null.
 
 
- 
- 
Method Details- 
getComponentCreates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilder. Will generate a bean name.- Parameters:
- builder- must not be null.
- Returns:
 
- 
getComponentIdButFallbackpublic BeanComponentDefinition getComponentIdButFallback(BeanDefinitionBuilder builder, String fallback) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilderand inspects the backingElements id attribute for a name. It will use this one if found or the given fallback if not.- Parameters:
- builder- must not be null.
- fallback- must not be null or empty.
- Returns:
 
- 
getComponentCreates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilderusing the given name.- Parameters:
- builder- must not be null.
- name- must not be null or empty.
- Returns:
 
- 
getComponentpublic BeanComponentDefinition getComponent(BeanDefinitionBuilder builder, String name, Object rawSource) Creates a newBeanComponentDefinitionfrom the givenBeanDefinitionBuilderusing the given name and raw source object.- Parameters:
- builder- must not be null.
- name- must not be null.
- rawSource-
- Returns:
 
 
-