org.sadun.util.xml.configuration
Class AutoConfigurator
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.sadun.util.xml.configuration.BaseConfigurator
org.sadun.util.xml.configuration.AutoConfigurator
- All Implemented Interfaces:
- Configurator, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public abstract class AutoConfigurator
- extends BaseConfigurator
This configurator automatically binds fields to tags in the HTML.
- Author:
- Cristiano Sadun
Methods inherited from class org.sadun.util.xml.configuration.BaseConfigurator |
characters, checkCompleted, getBooleanText, getByteText, getConfiguredObject, getDoubleText, getFloatText, getIntText, getLongText, getShortText, getText, getTextAndResetBuffer, getTextAndResetBuffer, isCompleted, toString |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping |
AutoConfigurator
public AutoConfigurator()
set
protected java.lang.reflect.Field set(java.lang.Object obj,
java.lang.String tagName)
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
hasFieldBeenSet
public boolean hasFieldBeenSet(java.lang.String fieldName)
hasTagBeenEncountered
public boolean hasTagBeenEncountered(java.lang.String tag)
setMandatory
public void setMandatory(java.lang.String fieldName)
isMandatory
public boolean isMandatory(java.lang.String fieldName)
startDocument
public void startDocument()
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Description copied from class:
BaseConfigurator
- Set
completed
to true.
- Specified by:
endElement
in interface Configurator
- Overrides:
endElement
in class BaseConfigurator
- Throws:
org.xml.sax.SAXException
setIgnore
public void setIgnore(java.lang.String tag)
isIgnorableTag
public boolean isIgnorableTag(java.lang.String tag)
- Returns:
set
protected java.lang.reflect.Field set(java.lang.String tagName)
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
doGetConfiguredObject
protected abstract java.lang.Object doGetConfiguredObject()
throws org.xml.sax.SAXException
- Specified by:
doGetConfiguredObject
in class BaseConfigurator
- Throws:
org.xml.sax.SAXException