org.apache.commons.betwixt.digester
Class MappedPropertyRule
java.lang.Object
org.apache.commons.digester.Rule
org.apache.commons.betwixt.digester.RuleSupport
org.apache.commons.betwixt.digester.MappedPropertyRule
- Direct Known Subclasses:
- ElementRule, TextRule
public abstract class MappedPropertyRule
- extends RuleSupport
Factors out common code used by Betwixt rules that access bean properties.
Maybe a lot of this should be moved into BeanUtils
.
- Since:
- 0.5
- Author:
- Robert Burrell Donkin
Fields inherited from class org.apache.commons.digester.Rule |
digester, namespaceURI |
Method Summary |
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 |
begin, begin, body, body, end, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MappedPropertyRule
public MappedPropertyRule()
- Base constructor
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
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
Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.