org.apache.commons.betwixt.digester
Class ElementRule
java.lang.Object
|
+--org.apache.commons.digester.Rule
|
+--org.apache.commons.betwixt.digester.RuleSupport
|
+--org.apache.commons.betwixt.digester.ElementRule
- public class ElementRule
- extends RuleSupport
ElementRule
the digester Rule for parsing
the <element> elements.
- Version:
- $Id: ElementRule.java,v 1.6 2003/01/07 22:32:57 rdonkin Exp $
- Author:
- James Strachan
Fields inherited from class org.apache.commons.digester.Rule |
digester, namespaceURI |
Method Summary |
void |
begin(org.xml.sax.Attributes attributes)
Process the beginning of this element. |
protected void |
configureDescriptor(ElementDescriptor elementDescriptor)
Set the Expression and Updater from a bean property name |
void |
end()
Process the end of this element. |
protected java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.Class beanClass,
java.lang.String propertyName)
Returns the property descriptor for the class and property name. |
protected java.lang.Class |
getPropertyType(java.lang.String propertyClassName,
java.lang.Class beanClass,
java.lang.String propertyName)
Gets the type of a property |
Methods inherited from class org.apache.commons.digester.Rule |
body, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementRule
public ElementRule()
- Base constructor
begin
public void begin(org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Process the beginning of this element.
- Overrides:
begin
in class org.apache.commons.digester.Rule
- Parameters:
attributes
- The attribute list of this element- Throws:
org.xml.sax.SAXException
- when this tag's parent is not either an info or element tag
end
public void end()
- Process the end of this element.
- Overrides:
end
in class org.apache.commons.digester.Rule
getPropertyType
protected java.lang.Class getPropertyType(java.lang.String propertyClassName,
java.lang.Class beanClass,
java.lang.String propertyName)
- Gets the type of a property
- Parameters:
propertyClassName
- class name for property type (may be null)beanClass
- class that has propertypropertyName
- the name of the property whose type is to be determined- Returns:
- property type
configureDescriptor
protected void configureDescriptor(ElementDescriptor elementDescriptor)
- Set the Expression and Updater from a bean property name
- Parameters:
elementDescriptor
- configure this ElementDescriptor
getPropertyDescriptor
protected java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Class beanClass,
java.lang.String propertyName)
- Returns the property descriptor for the class and property name.
Note that some caching could be used to improve performance of
this method. Or this method could be added to PropertyUtils.
- Parameters:
beanClass
- descriptor for property in this classpropertyName
- descriptor for property with this name- Returns:
- property descriptor for the named property in the given class
Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.