org.apache.commons.betwixt.digester
Class AttributeRule

java.lang.Object
  extended by org.apache.commons.digester.Rule
      extended by org.apache.commons.betwixt.digester.RuleSupport
          extended by org.apache.commons.betwixt.digester.AttributeRule

public class AttributeRule
extends RuleSupport

AttributeRule the digester Rule for parsing the <attribute> elements.

Version:
$Id: AttributeRule.java,v 1.5 2003/01/07 22:32:57 rdonkin Exp $
Author:
James Strachan

Field Summary
private  java.lang.Class beanClass
          The Class whose .betwixt file is being digested
private  java.lang.ClassLoader classLoader
          This loads all classes created by name.
private static Log log
          Logger
 
Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
 
Constructor Summary
AttributeRule()
          Base constructor
 
Method Summary
 void begin(org.xml.sax.Attributes attributes)
          Process the beginning of this element.
protected  void configureDescriptor(AttributeDescriptor attributeDescriptor)
          Set the Expression and Updater from a bean property name
 void end()
          Process the end of this element.
protected  java.lang.Class loadClass(java.lang.String name)
          Loads a class (using the appropriate classloader)
 
Methods inherited from class org.apache.commons.betwixt.digester.RuleSupport
getBeanClass, getProcessedPropertyNameSet, getXMLInfoDigester, getXMLIntrospector
 
Methods inherited from class org.apache.commons.digester.Rule
begin, body, body, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final Log log
Logger


classLoader

private java.lang.ClassLoader classLoader
This loads all classes created by name. Defaults to this class's classloader


beanClass

private java.lang.Class beanClass
The Class whose .betwixt file is being digested

Constructor Detail

AttributeRule

public AttributeRule()
Base constructor

Method Detail

begin

public void begin(org.xml.sax.Attributes attributes)
           throws org.xml.sax.SAXException
Process the beginning of this element.

Overrides:
begin in class Rule
Parameters:
attributes - The attribute list of this element
Throws:
org.xml.sax.SAXException - if the attribute tag is not inside an element tag

end

public void end()
Process the end of this element.

Overrides:
end in class Rule

loadClass

protected java.lang.Class loadClass(java.lang.String name)
Loads a class (using the appropriate classloader)

Parameters:
name - the name of the class to load
Returns:
the class instance loaded by the appropriate classloader

configureDescriptor

protected void configureDescriptor(AttributeDescriptor attributeDescriptor)
Set the Expression and Updater from a bean property name

Parameters:
attributeDescriptor - configure this AttributeDescriptor from the property with a matching name in the bean class