org.apache.commons.digester
public class BeanPropertySetterRule extends Rule
Rule implements sets a bean property on the top object to the body text.
The property set:
Using the second method and the {@link ExtendedBaseRules} child match pattern, all the child elements can be automatically mapped to properties on the parent object.
Field Summary | |
---|---|
protected String | bodyText
The body text used to set the property. |
protected String | propertyName
Set this property on the top object. |
Constructor Summary | |
---|---|
BeanPropertySetterRule(Digester digester, String propertyName) Construct rule that sets the given property from the body text. | |
BeanPropertySetterRule(Digester digester) Construct rule that automatically sets a property from the body text. | |
BeanPropertySetterRule(String propertyName) Construct rule that sets the given property from the body text. | |
BeanPropertySetterRule() Construct rule that automatically sets a property from the body text. |
Method Summary | |
---|---|
void | body(String namespace, String name, String text)
Process the body text of this element.
|
void | end(String namespace, String name)
Process the end of this element.
|
void | finish()
Clean up after parsing is complete. |
String | toString()
Render a printable version of this Rule. |
Deprecated: The digester instance is now set in the {@link Digester#addRule} method. Use {@link #BeanPropertySetterRule(String propertyName)} instead.
Construct rule that sets the given property from the body text.
Parameters: digester associated Digester
propertyName name of property to set
Deprecated: The digester instance is now set in the {@link Digester#addRule} method. Use {@link #BeanPropertySetterRule()} instead.
Construct rule that automatically sets a property from the body text.
This construct creates a rule that sets the property on the top object named the same as the current element.
Parameters: digester associated Digester
Construct rule that sets the given property from the body text.
Parameters: propertyName name of property to set
Construct rule that automatically sets a property from the body text.
This construct creates a rule that sets the property on the top object named the same as the current element.
Parameters: namespace the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace name the local name if the parser is namespace aware, or just the element name otherwise text The text of the body of this element
Parameters: namespace the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace name the local name if the parser is namespace aware, or just the element name otherwise
Throws: NoSuchMethodException if the bean does not have a writeable property of the specified name