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 Summary
ConstructorsConstructorDescriptionBeanComponentDefinitionBuilder(Element defaultSource, org.springframework.beans.factory.xml.ParserContext context) Creates a newBeanComponentDefinitionBuilderusing the givenElementas default source and the givenParserContext. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.beans.factory.parsing.BeanComponentDefinitiongetComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilder.org.springframework.beans.factory.parsing.BeanComponentDefinitiongetComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String name) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilderusing the given name.org.springframework.beans.factory.parsing.BeanComponentDefinitiongetComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String name, Object rawSource) Creates a newBeanComponentDefinitionfrom the givenBeanDefinitionBuilderusing the given name and raw source object.org.springframework.beans.factory.parsing.BeanComponentDefinitiongetComponentIdButFallback(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String fallback) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilderand inspects the backingElements id attribute for a name.
-
Constructor Details
-
BeanComponentDefinitionBuilder
public BeanComponentDefinitionBuilder(Element defaultSource, org.springframework.beans.factory.xml.ParserContext context) Creates a newBeanComponentDefinitionBuilderusing the givenElementas default source and the givenParserContext.- Parameters:
defaultSource- must not be null.context- must not be null.
-
-
Method Details
-
getComponent
public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilder. Will generate a bean name.- Parameters:
builder- must not be null.- Returns:
-
getComponentIdButFallback
public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponentIdButFallback(org.springframework.beans.factory.support.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:
-
getComponent
public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String name) Creates aBeanComponentDefinitionfrom the givenBeanDefinitionBuilderusing the given name.- Parameters:
builder- must not be null.name- must not be null or empty.- Returns:
-
getComponent
public org.springframework.beans.factory.parsing.BeanComponentDefinition getComponent(org.springframework.beans.factory.support.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:
-