public abstract class ParsingUtils extends Object
BeanDefinitionParser
implementations.Modifier and Type | Method and Description |
---|---|
static AbstractBeanDefinition |
getObjectFactoryBeanDefinition(String targetBeanName,
Object source)
Returns a
BeanDefinition for an ObjectFactoryCreatingFactoryBean pointing to the bean with the
given name. |
static AbstractBeanDefinition |
getSourceBeanDefinition(BeanDefinitionBuilder builder,
Object source)
Returns the
AbstractBeanDefinition built by the given builder with the given extracted source applied. |
static AbstractBeanDefinition |
getSourceBeanDefinition(BeanDefinitionBuilder builder,
ParserContext context,
Element element)
Returns the
BeanDefinition built by the given BeanDefinitionBuilder enriched with source
information derived from the given Element . |
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.
|
static void |
setPropertyValue(BeanDefinitionBuilder builder,
Element element,
String attribute)
Sets the property with the given attribute name on the given
BeanDefinitionBuilder to the value of the
attribute with the given name if the attribute is configured. |
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 given
Element if the attribute is configured. |
public static void setPropertyValue(BeanDefinitionBuilder builder, Element element, String attrName, String propertyName)
Element
if the attribute is configured.builder
- must not be null.element
- must not be null.attrName
- must not be null or empty.propertyName
- must not be null or empty.public static void setPropertyValue(BeanDefinitionBuilder builder, Element element, String attribute)
BeanDefinitionBuilder
to the value of the
attribute with the given name if the attribute is configured.builder
- must not be null.element
- must not be null.attribute
- must not be null or empty.public static void setPropertyReference(BeanDefinitionBuilder builder, Element element, String attribute, String property)
builder
- must not be null.element
- must not be null.attribute
- must not be null or empty.property
- must not be nullor empty.public static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder, ParserContext context, Element element)
BeanDefinition
built by the given BeanDefinitionBuilder
enriched with source
information derived from the given Element
.builder
- must not be null.context
- must not be null.element
- must not be null.public static AbstractBeanDefinition getSourceBeanDefinition(BeanDefinitionBuilder builder, Object source)
AbstractBeanDefinition
built by the given builder with the given extracted source applied.builder
- must not be null.source
- public static AbstractBeanDefinition getObjectFactoryBeanDefinition(String targetBeanName, Object source)
BeanDefinition
for an ObjectFactoryCreatingFactoryBean
pointing to the bean with the
given name.targetBeanName
- must not be null or empty.source
- Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.