Class SetPropertiesBuilder
java.lang.Object
org.apache.commons.digester3.binder.AbstractBackToLinkedRuleBuilder<SetPropertiesRule>
org.apache.commons.digester3.binder.SetPropertiesBuilder
- All Implemented Interfaces:
RuleProvider<SetPropertiesRule>
Builder chained when invoking
LinkedRuleBuilder.setProperties()
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
-
Constructor Summary
ConstructorsConstructorDescriptionSetPropertiesBuilder
(String keyPattern, String namespaceURI, RulesBinder mainBinder, LinkedRuleBuilder mainBuilder) -
Method Summary
Modifier and TypeMethodDescriptionAdd an additional attribute name to property name mapping.Deprecated.protected SetPropertiesRule
Provides an instance ofRule
.ignoreAttribute
(String attributeName) Add an attribute name to the ignore list.ignoreMissingProperty
(boolean ignoreMissingProperty) Sets whether attributes found in the XML without matching properties should be ignored.Methods inherited from class org.apache.commons.digester3.binder.AbstractBackToLinkedRuleBuilder
get, getNamespaceURI, getPattern, reportError, then
-
Field Details
-
aliases
-
ignoreMissingProperty
private boolean ignoreMissingProperty
-
-
Constructor Details
-
SetPropertiesBuilder
SetPropertiesBuilder(String keyPattern, String namespaceURI, RulesBinder mainBinder, LinkedRuleBuilder mainBuilder)
-
-
Method Details
-
addAlias
Deprecated.Add an additional attribute name to property name mapping.- Parameters:
attributeName
- The attribute to matchpropertyName
- The java bean property to be assigned the value- Returns:
- this builder instance
-
addAlias
Add an additional attribute name to property name mapping.- Parameters:
attributeName
- The attribute to match- Returns:
- the property alias builder
- Since:
- 3.2
-
ignoreAttribute
Add an attribute name to the ignore list.- Parameters:
attributeName
- The attribute to match has to be ignored- Returns:
- this builder instance
-
ignoreMissingProperty
Sets whether attributes found in the XML without matching properties should be ignored. If set to false, the parsing will throw anNoSuchMethodException
if an unmatched attribute is found. This allows to trap misspellings in the XML file.- Parameters:
ignoreMissingProperty
- false to stop the parsing on unmatched attributes- Returns:
- this builder instance
-
createRule
Provides an instance ofRule
. Must never return null.- Specified by:
createRule
in classAbstractBackToLinkedRuleBuilder<SetPropertiesRule>
- Returns:
- an instance of
Rule
. - See Also:
-