net.sf.swan.xml.input.reflect
Class BeanAdapter
java.lang.Object
|
+--net.sf.swan.xml.input.event.ContextAdapter
|
+--net.sf.swan.xml.input.reflect.ReflectAdapter
|
+--net.sf.swan.xml.input.reflect.BeanAdapter
- All Implemented Interfaces:
- ContextListener
- public class BeanAdapter
- extends ReflectAdapter
Component that uses reflection to match elements to JavaBean properties.
Constructor Summary |
BeanAdapter(java.lang.Class beanType)
Constructor to match all elements to bean properties, irrespective
of the element's namespace. |
BeanAdapter(java.lang.String namespaceURI,
java.lang.Class beanType)
Constructor to match all elements in the specified namespace
to bean properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanAdapter
public BeanAdapter(java.lang.String namespaceURI,
java.lang.Class beanType)
throws java.beans.IntrospectionException
- Constructor to match all elements in the specified namespace
to bean properties. The namespace may be
null
or the empty string "". Elements will be matched to bean
properties whose name matches the element's local name.
BeanAdapter
public BeanAdapter(java.lang.Class beanType)
throws java.beans.IntrospectionException
- Constructor to match all elements to bean properties, irrespective
of the element's namespace. This should only be used with other
mechanisms that ensure that this component is getting the right
events. Typically this would be used in conjunction with a
PatternsBuilder
.
startElement
public void startElement(StartElementEvent event)
throws EventContextException
- Overrides:
startElement
in class ReflectAdapter
endElement
public void endElement(EndElementEvent event)
throws EventContextException
- Overrides:
endElement
in class ReflectAdapter
text
public void text(TextEvent event)
throws EventContextException
- Overrides:
text
in class ReflectAdapter