public final class NestedPropertiesBuilder extends Object
LinkedRuleBuilder.setNestedProperties()
.Modifier and Type | Method and Description |
---|---|
AddAliasBuilder<NestedPropertiesBuilder> |
addAlias(String elementName)
Allows element2property mapping to be overridden.
|
NestedPropertiesBuilder |
addAlias(String elementName,
String propertyName)
Deprecated.
|
NestedPropertiesBuilder |
allowUnknownChildElements(boolean allowUnknownChildElements)
Determines whether an error is reported when a nested element is encountered for which there is no corresponding
property-setter method.
|
protected SetNestedPropertiesRule |
createRule()
Provides an instance of
Rule . |
R |
get()
Provides an instance of
Rule . |
String |
getNamespaceURI()
Returns the namespace URI for which this Rule is relevant, if any.
|
String |
getPattern()
Returns the rule pattern associated to this builder.
|
NestedPropertiesBuilder |
ignoreElement(String elementName)
Allows ignore a matching element.
|
protected void |
reportError(String methodChain,
String message) |
LinkedRuleBuilder |
then()
Come back to the main
LinkedRuleBuilder . |
NestedPropertiesBuilder |
trimData(boolean trimData)
When set to true, any text within child elements will have leading
and trailing whitespace removed before assignment to the target
object.
|
public NestedPropertiesBuilder ignoreElement(String elementName)
elementName
- The child xml element to be ignored@Deprecated public NestedPropertiesBuilder addAlias(String elementName, String propertyName)
elementName
- The child xml element to matchpropertyName
- The java bean property to be assigned the valuepublic AddAliasBuilder<NestedPropertiesBuilder> addAlias(String elementName)
elementName
- The child xml element to matchpublic NestedPropertiesBuilder trimData(boolean trimData)
trimData
- Flag to set any text within child elements will have leading
and trailing whitespace removedpublic NestedPropertiesBuilder allowUnknownChildElements(boolean allowUnknownChildElements)
allowUnknownChildElements
- flag to ignore any child element for which there is no corresponding
object propertyprotected SetNestedPropertiesRule createRule()
Rule
. Must never return null.public final LinkedRuleBuilder then()
LinkedRuleBuilder
.LinkedRuleBuilder
public final String getNamespaceURI()
public final R get()
Rule
. Must never return null.get
in interface RuleProvider<R extends Rule>
Rule
.protected final void reportError(String methodChain, String message)
public final String getPattern()
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.