Package org.springframework.data.config
Class ParsingUtils
java.lang.Object
org.springframework.data.config.ParsingUtils
Utility methods for 
BeanDefinitionParser implementations.- Author:
- Oliver Gierke, Mark Paluch
- 
Method SummaryModifier and TypeMethodDescriptionstatic AbstractBeanDefinitiongetObjectFactoryBeanDefinition(String targetBeanName, Object source) Returns aBeanDefinitionfor anObjectFactoryCreatingFactoryBeanpointing to the bean with the given name.static AbstractBeanDefinitiongetSourceBeanDefinition(BeanDefinitionBuilder builder, Object source) Returns theAbstractBeanDefinitionbuilt by the given builder with the given extracted source applied.static AbstractBeanDefinitiongetSourceBeanDefinition(BeanDefinitionBuilder builder, ParserContext context, Element element) Returns theBeanDefinitionbuilt by the givenBeanDefinitionBuilderenriched with source information derived from the givenElement.static voidsetPropertyReference(BeanDefinitionBuilder builder, Element element, String attribute, String property) Configures a bean property reference with the value of the attribute of the given name if it is configured.static voidsetPropertyValue(BeanDefinitionBuilder builder, Element element, String attribute) Sets the property with the given attribute name on the givenBeanDefinitionBuilderto the value of the attribute with the given name if the attribute is configured.static voidsetPropertyValue(BeanDefinitionBuilder builder, Element element, String attrName, String propertyName) Configures a property value for the given property name reading the attribute of the given name from the givenElementif the attribute is configured.
- 
Method Details- 
setPropertyValuepublic static void setPropertyValue(BeanDefinitionBuilder builder, Element element, String attrName, String propertyName) Configures a property value for the given property name reading the attribute of the given name from the givenElementif the attribute is configured.- Parameters:
- builder- must not be null.
- element- must not be null.
- attrName- must not be null or empty.
- propertyName- must not be null or empty.
 
- 
setPropertyValuepublic static void setPropertyValue(BeanDefinitionBuilder builder, Element element, String attribute) Sets the property with the given attribute name on the givenBeanDefinitionBuilderto the value of the attribute with the given name if the attribute is configured.- Parameters:
- builder- must not be null.
- element- must not be null.
- attribute- must not be null or empty.
 
- 
setPropertyReferencepublic static void setPropertyReference(BeanDefinitionBuilder builder, Element element, String attribute, String property) Configures a bean property reference with the value of the attribute of the given name if it is configured.- Parameters:
- builder- must not be null.
- element- must not be null.
- attribute- must not be null or empty.
- property- must not be nullor empty.
 
- 
getSourceBeanDefinitionpublic static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder, ParserContext context, Element element) Returns theBeanDefinitionbuilt by the givenBeanDefinitionBuilderenriched with source information derived from the givenElement.- Parameters:
- builder- must not be null.
- context- must not be null.
- element- must not be null.
- Returns:
 
- 
getSourceBeanDefinitionpublic static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder, @Nullable Object source) Returns theAbstractBeanDefinitionbuilt by the given builder with the given extracted source applied.- Parameters:
- builder- must not be null.
- source-
- Returns:
 
- 
getObjectFactoryBeanDefinitionpublic static AbstractBeanDefinition getObjectFactoryBeanDefinition(String targetBeanName, @Nullable Object source) Returns aBeanDefinitionfor anObjectFactoryCreatingFactoryBeanpointing to the bean with the given name.- Parameters:
- targetBeanName- must not be null or empty.
- source-
- Returns:
 
 
-