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
ConstructorDescriptionBeanComponentDefinitionBuilder
(Element defaultSource, org.springframework.beans.factory.xml.ParserContext context) Creates a newBeanComponentDefinitionBuilder
using the givenElement
as default source and the givenParserContext
. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.beans.factory.parsing.BeanComponentDefinition
getComponent
(org.springframework.beans.factory.support.BeanDefinitionBuilder builder) Creates aBeanComponentDefinition
from the givenBeanDefinitionBuilder
.org.springframework.beans.factory.parsing.BeanComponentDefinition
getComponent
(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String name) Creates aBeanComponentDefinition
from the givenBeanDefinitionBuilder
using the given name.org.springframework.beans.factory.parsing.BeanComponentDefinition
getComponent
(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String name, Object rawSource) Creates a newBeanComponentDefinition
from the givenBeanDefinitionBuilder
using the given name and raw source object.org.springframework.beans.factory.parsing.BeanComponentDefinition
getComponentIdButFallback
(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, String fallback) Creates aBeanComponentDefinition
from the givenBeanDefinitionBuilder
and inspects the backingElement
s id attribute for a name.
-
Constructor Details
-
BeanComponentDefinitionBuilder
public BeanComponentDefinitionBuilder(Element defaultSource, org.springframework.beans.factory.xml.ParserContext context) Creates a newBeanComponentDefinitionBuilder
using the givenElement
as 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 aBeanComponentDefinition
from 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 aBeanComponentDefinition
from the givenBeanDefinitionBuilder
and inspects the backingElement
s 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 aBeanComponentDefinition
from the givenBeanDefinitionBuilder
using 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 newBeanComponentDefinition
from the givenBeanDefinitionBuilder
using the given name and raw source object.- Parameters:
builder
- must not be null.name
- must not be null.rawSource
-- Returns:
-