ElementHandler
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private ElementHandler | |
| private final Map | |
| private ExceptionListener | |
| private Reference | |
| private final List | |
| private Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | characters(char[]
the array of characters chars, int the start position in the character array start, int the number of characters to use length)Overrides org. Implements org. Parses character data inside XML element. |
| public void | endElement(String
the namespace URI, or the empty string
if the element has no namespace URI or
if namespace processing is not being performed uri, String the local name (without prefix), or the empty string
if namespace processing is not being performed localName, String the qualified name (with prefix), or the empty string
if qualified names are not available qName)Overrides org. Implements org. Parses closing tag of XML element using corresponding element handler. |
| public Class | |
| public ClassLoader | Returns: the class loader used to instantiate objectsReturns the class loader used to instantiate objects. |
| public Class | Returns: the corresponding element handlerthe name of the element name)Returns the handler for the element with specified name. |
| public ExceptionListener | Returns: the exception listener for parsingReturns the exception listener for parsing. |
| public Object[] | |
| public Object | |
| public Object | Returns: the value of the variablethe identifier id)Returns the value of the variable with specified identifier. |
| public void | handleException(Exception
an exception to handle exception)Handles an exception using current exception listener. |
| public boolean | Returns: true if the variable is defined;
false otherwisethe identifier id)Indicates whether the variable with specified identifier is defined. |
| public void | parse(final InputSource
the input source to parse input)Starts parsing of the specified input source. |
| public InputSource | resolveEntity(String publicId, String systemId)
Overrides org. Implements org. Disables any external entities. |
| public void | setClassLoader(ClassLoader
a classloader to use loader)Sets the class loader used to instantiate objects. |
| public void | setElementHandler(String
the name of the element name, Class<? extends ElementHandler> the corresponding element handler handler)Sets the handler for the element with specified name. |
| public void | setExceptionListener(ExceptionListener
the exception listener for parsing listener)Sets the exception listener for parsing. |
| public void | |
| public void | setVariable(String
the identifier id, Object new value of the variable value)Sets new value of the variable with specified identifier. |
| public void | startDocument()
Overrides org. Implements org. Prepares this handler to read objects from XML document. |
| public void | startElement(String
the namespace URI, or the empty string
if the element has no namespace URI or
if namespace processing is not being performed uri, String the local name (without prefix), or the empty string
if namespace processing is not being performed localName, String the qualified name (with prefix), or the empty string
if qualified names are not available qName, Attributes the attributes attached to the element attributes)Overrides org. Implements org. Parses opening tag of XML element using corresponding element handler. |
| environment | back to summary |
|---|---|
| private final Map<String, Object> environment | |
| handler | back to summary |
|---|---|
| private ElementHandler handler | |
| handlers | back to summary |
|---|---|
| private final Map<String, Class<? extends ElementHandler>> handlers | |
| listener | back to summary |
|---|---|
| private ExceptionListener listener | |
| loader | back to summary |
|---|---|
| private Reference<ClassLoader> loader | |
| objects | back to summary |
|---|---|
| private final List<Object> objects | |
| owner | back to summary |
|---|---|
| private Object owner | |
| DocumentHandler | back to summary |
|---|---|
| public DocumentHandler() Creates new instance of document handler. | |
| addObject | back to summary |
|---|---|
| pack-priv void addObject(Object object) Adds the object to the list of read objects.
| |
| characters | back to summary |
|---|---|
| public void characters(char[] chars, int start, int length) Overrides org. Implements org. Parses character data inside XML element.
| |
| endElement | back to summary |
|---|---|
| public void endElement(String uri, String localName, String qName) Overrides org. Implements org. Parses closing tag of XML element using corresponding element handler.
| |
| findClass | back to summary |
|---|---|
| public Class Resolves class by name using current class loader. This method handles exception using current exception listener. | |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader() Returns the class loader used to instantiate objects.
If the class loader has not been explicitly set
then
| |
| getElementHandler | back to summary |
|---|---|
| public Class Returns the handler for the element with specified name.
| |
| getExceptionListener | back to summary |
|---|---|
| public ExceptionListener getExceptionListener() Returns the exception listener for parsing. The exception listener is notified when handler catches recoverable exceptions. If the exception listener has not been explicitly set then default exception listener is returned.
| |
| getObjects | back to summary |
|---|---|
| public Object[] getObjects() Returns the array of read objects.
| |
| getOwner | back to summary |
|---|---|
| public Object getOwner() Returns the owner of this document handler.
| |
| getVariable | back to summary |
|---|---|
| public Object getVariable(String id) Returns the value of the variable with specified identifier. | |
| handleException | back to summary |
|---|---|
| public void handleException(Exception exception) Handles an exception using current exception listener.
| |
| hasVariable | back to summary |
|---|---|
| public boolean hasVariable(String id) Indicates whether the variable with specified identifier is defined.
| |
| parse | back to summary |
|---|---|
| public void parse(final InputSource input) Starts parsing of the specified input source.
| |
| resolveEntity | back to summary |
|---|---|
| public InputSource resolveEntity(String publicId, String systemId) Overrides org. Implements org. Disables any external entities.
| |
| setClassLoader | back to summary |
|---|---|
| public void setClassLoader(ClassLoader loader) Sets the class loader used to instantiate objects. If the class loader is not set then default class loader will be used.
| |
| setElementHandler | back to summary |
|---|---|
| public void setElementHandler(String name, Class<? extends ElementHandler> handler) Sets the handler for the element with specified name.
| |
| setExceptionListener | back to summary |
|---|---|
| public void setExceptionListener(ExceptionListener listener) Sets the exception listener for parsing. The exception listener is notified when handler catches recoverable exceptions.
| |
| setOwner | back to summary |
|---|---|
| public void setOwner(Object owner) Sets the owner of this document handler.
| |
| setVariable | back to summary |
|---|---|
| public void setVariable(String id, Object value) Sets new value of the variable with specified identifier. | |
| startDocument | back to summary |
|---|---|
| public void startDocument() Overrides org. Implements org. Prepares this handler to read objects from XML document.
| |
| startElement | back to summary |
|---|---|
| public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException Overrides org. Implements org. Parses opening tag of XML element using corresponding element handler.
| |