Save This Page
Home » commons-digester-1.8-src » org.apache.commons » digester » [javadoc | source]
org.apache.commons.digester
public class: BeanPropertySetterRule [javadoc | source]
java.lang.Object
   org.apache.commons.digester.Rule
      org.apache.commons.digester.BeanPropertySetterRule

Rule implements sets a bean property on the top object to the body text.

The property set:

Using the second method and the ExtendedBaseRules child match pattern, all the child elements can be automatically mapped to properties on the parent object.

Field Summary
protected  String propertyName    Set this property on the top object. 
protected  String bodyText    The body text used to set the property. 
Fields inherited from org.apache.commons.digester.Rule:
digester,  namespaceURI
Constructor:
 public BeanPropertySetterRule() 
 public BeanPropertySetterRule(Digester digester) 

    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
 public BeanPropertySetterRule(String propertyName) 

    Construct rule that sets the given property from the body text.

    Parameters:
    propertyName - name of property to set
 public BeanPropertySetterRule(Digester digester,
    String propertyName) 

    Construct rule that sets the given property from the body text.

    Parameters:
    digester - associated Digester
    propertyName - name of property to set
Method from org.apache.commons.digester.BeanPropertySetterRule Summary:
body,   end,   finish,   toString
Methods from org.apache.commons.digester.Rule:
begin,   begin,   body,   body,   end,   end,   finish,   getDigester,   getNamespaceURI,   setDigester,   setNamespaceURI
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.digester.BeanPropertySetterRule Detail:
 public  void body(String namespace,
    String name,
    String text) throws Exception 
    Process the body text of this element.
 public  void end(String namespace,
    String name) throws Exception 
    Process the end of this element.
 public  void finish() throws Exception 
    Clean up after parsing is complete.
 public String toString() 
    Render a printable version of this Rule.