Class NestedPropertiesBuilder
java.lang.Object
org.apache.commons.digester3.binder.NestedPropertiesBuilder
- All Implemented Interfaces:
RuleProvider<SetNestedPropertiesRule>
Builder chained when invoking
LinkedRuleBuilder.setNestedProperties().- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionAllows element2property mapping to be overridden.Deprecated.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 SetNestedPropertiesRuleProvides an instance ofRule.final SetNestedPropertiesRuleget()Provides an instance ofRule.final StringReturns the namespace URI for which this Rule is relevant, if any.final StringReturns the rule pattern associated to this builder.ignoreElement(String elementName) Allows ignore a matching element.protected final voidreportError(String methodChain, String message) final LinkedRuleBuilderthen()Come back to the mainLinkedRuleBuilder.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.
-
Method Details
-
ignoreElement
Allows ignore a matching element.- Parameters:
elementName- The child xml element to be ignored- Returns:
- this builder instance
-
addAlias
Deprecated.Allows element2property mapping to be overridden.- Parameters:
elementName- The child xml element to matchpropertyName- The java bean property to be assigned the value- Returns:
- this builder instance
-
addAlias
Allows element2property mapping to be overridden.- Parameters:
elementName- The child xml element to match- Returns:
- the property alias builder
- Since:
- 3.2
-
trimData
When set to true, any text within child elements will have leading and trailing whitespace removed before assignment to the target object.- Parameters:
trimData- Flag to set any text within child elements will have leading and trailing whitespace removed- Returns:
- this builder instance
-
allowUnknownChildElements
Determines whether an error is reported when a nested element is encountered for which there is no corresponding property-setter method.- Parameters:
allowUnknownChildElements- flag to ignore any child element for which there is no corresponding object property- Returns:
- this builder instance
-
createRule
-
then
Come back to the mainLinkedRuleBuilder.- Returns:
- the main
LinkedRuleBuilder
-
getNamespaceURI
Returns the namespace URI for which this Rule is relevant, if any.- Returns:
- The namespace URI for which this Rule is relevant, if any
-
get
Provides an instance ofRule. Must never return null.- Specified by:
getin interfaceRuleProvider<R extends Rule>- Returns:
- an instance of
Rule.
-
reportError
-
getPattern
Returns the rule pattern associated to this builder.- Returns:
- The rule pattern associated to this builder
-