| Modifier and Type | Class and Description |
|---|---|
| private static class | BeanHandler.ElementInfo
Element info class |
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private BeanHandler. | |
| private Locator | |
| private static final Logger | |
| private String | |
| private Method | |
| private StringBuilder |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| public void | characters(char[]
The characters. ch, int The start position in the character array. start, int The number of characters to use from the
character array. length)Overrides org. Implements org. |
| private Method | chooseSetMethod(final Class<T> objClass, final String prefix, final String name, final Class<T> preferredParameterType)
|
| private static Object | |
| private Object | createChild(final BeanHandler.
Creates a child element of an object. |
| private static Object | |
| public final void | endElement(final String
The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed. uri, final String The local name (without prefix), or the
empty string if Namespace processing is not being
performed. localName, final String The qualified name (with prefix), or the
empty string if qualified names are not available. qName)Overrides org. Implements org. |
| private boolean | |
| private void | |
| private boolean | |
| private static Method | |
| private Method | findSetMethod(final Class<T> objClass, final String prefix, final String name)
Finds a setter method. |
| private String | |
| private String | |
| private static String | makeMethodName(final String prefix, final String name)
Builds a method name from an element or attribute name. |
| private void | setAttribute(final BeanHandler.
Sets an attribute. |
| public final void | setDocumentLocator(Locator
A locator for all SAX document events. locator)Overrides org. Implements org. |
| public final void | startElement(final String
The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed. uri, final String The local name (without prefix), or the
empty string if Namespace processing is not being
performed. localName, final String The qualified name (with prefix), or the
empty string if qualified names are not available. qName, final Attributes The attributes attached to the element. If
there are no attributes, it shall be an empty
Attributes object. attributes)Overrides org. Implements org. |
| private boolean | startExtractingSubtree(String name)
Determine whether we should start extracting a subtree, based on whether there is an extract method for this tag in the parent bean. |
| bean | back to summary |
|---|---|
| private final Object bean | |
| element | back to summary |
|---|---|
| private BeanHandler. | |
| locator | back to summary |
|---|---|
| private Locator locator | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| subtreeMatchingQname | back to summary |
|---|---|
| private String subtreeMatchingQname | |
| subtreeMethod | back to summary |
|---|---|
| private Method subtreeMethod | |
| subtreeText | back to summary |
|---|---|
| private StringBuilder subtreeText | |
| BeanHandler | back to summary |
|---|---|
| public BeanHandler(final Object bean) Constructor. | |
| addChild | back to summary |
|---|---|
| private void addChild(final Object parent, final Object child, final String name) throws SAXException Attaches a child element to its parent. | |
| appendToSubtree | back to summary |
|---|---|
| private void appendToSubtree(String text) Append to the current extracted subtree text | |
| appendToSubtree | back to summary |
|---|---|
| private void appendToSubtree(char[] text, int start, int length) Append to the current extracted subtree text | |
| characters | back to summary |
|---|---|
| public void characters(char[] ch, int start, int length) throws SAXException Overrides org. Implements org. Receive notification of character data within an element - only used currently when extracting an xml subtree
| |
| chooseSetMethod | back to summary |
|---|---|
| private Method chooseSetMethod(final Class<T> objClass, final String prefix, final String name, final Class<T> preferredParameterType) throws Exception | |
| convert | back to summary |
|---|---|
| private static Object convert(String attributeName, final Class<T> toClass, final String value) throws Exception Converts a string to an object of a particular class.
| |
| createChild | back to summary |
|---|---|
| private Object createChild(final BeanHandler. Creates a child element of an object. | |
| createInstance | back to summary |
|---|---|
| private static Object createInstance(Object parent, Class<T> childClass) throws Exception Creates a child object. | |
| endElement | back to summary |
|---|---|
| public final void endElement(final String uri, final String localName, final String qName) throws SAXException Overrides org. Implements org. Receive notification of the end of an element.
| |
| endsSubtree | back to summary |
|---|---|
| private boolean endsSubtree(String endName) Determine whether the current endName tag ends the subtree matching | |
| endSubtree | back to summary |
|---|---|
| private void endSubtree() throws SAXException | |
| extractingSubtree | back to summary |
|---|---|
| private boolean extractingSubtree() | |
| findCreateMethod | back to summary |
|---|---|
| private static Method findCreateMethod(Class<T> objClass, String name) Finds a creator method. | |
| findSetMethod | back to summary |
|---|---|
| private Method findSetMethod(final Class<T> objClass, final String prefix, final String name) throws Exception Finds a setter method. | |
| getLocation | back to summary |
|---|---|
| private String getLocation() Formats the current document location. | |
| getTagPart | back to summary |
|---|---|
| private String getTagPart(String qName) | |
| makeMethodName | back to summary |
|---|---|
| private static String makeMethodName(final String prefix, final String name) Builds a method name from an element or attribute name. | |
| setAttribute | back to summary |
|---|---|
| private void setAttribute(final BeanHandler. Sets an attribute. | |
| setDocumentLocator | back to summary |
|---|---|
| public final void setDocumentLocator(Locator locator) Overrides org. Implements org. Receive a Locator object for document events.
| |
| startElement | back to summary |
|---|---|
| public final void startElement(final String uri, final String localName, final String qName, final Attributes attributes) throws SAXException Overrides org. Implements org. Receive notification of the start of an element.
| |
| startExtractingSubtree | back to summary |
|---|---|
| private boolean startExtractingSubtree(String name) throws SAXException Determine whether we should start extracting a subtree, based on whether there is an extract method for this tag in the parent bean. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final String | |
| private final BeanHandler. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| bean | back to summary |
|---|---|
| private final Object bean | |
| elementName | back to summary |
|---|---|
| private final String elementName | |
| parent | back to summary |
|---|---|
| private final BeanHandler. | |
| ElementInfo | back to summary |
|---|---|
| public ElementInfo(final String elementName, final Object bean) | |
| ElementInfo | back to summary |
|---|---|
| public ElementInfo(final BeanHandler. | |