|
GXPARSE hosted by | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElementMapper<T extends Parser>
An ElementListener
that maps XML element names to
element handlers and invokes the appropriate handler for each element.
The handler will be equivalent to the
doElement
method of an ElementListener
.
The mapping may require the transformation of XML element names to different Java names, because some XML name characters cannot be used as Java name characters.
Defines some currency symbols that can be used as "escape" characters when replacing element name characters that cannot be used in Java names. Other characters can also be used if they comply with several requirements:
ESCAPE_DOLLAR
), the application must
use the character in a way that does not conflict with the way that Java
uses the character.
NamespaceMapper
Nested Class Summary | |
---|---|
static class |
ElementMapper.InvalidHandlerException
Exception thrown when doElement maps an XML name to a Java identifier that cannot be used to
invoke an
element handler . |
static class |
ElementMapper.NotFoundException
Exception thrown when doElement maps an XML name to a Java identifier that is not defined by
the application. |
Field Summary | |
---|---|
static char |
ESCAPE_CENT
Cent (¢) symbol for use in mapping element name characters to characters that can be used as Java name start characters. |
static char |
ESCAPE_CURRENCY
Currency (¤) symbol for use in mapping element name characters to characters that can be used as Java name start characters. |
static char |
ESCAPE_DOLLAR
Dollar ($) symbol for use in mapping element name characters to characters that can be used as Java name start characters. |
static char |
ESCAPE_POUND
Pound Sterling (£) symbol for use in mapping element name characters to characters that can be used as Java name start characters. |
static char |
ESCAPE_YEN
Yen (¥) symbol for use in mapping element name characters to characters that can be used as Java name start characters. |
Method Summary | |
---|---|
void |
doElement(T parser,
CurrentElement element)
Maps an XML element to a handler for the element and invokes the handler on the element. |
Field Detail |
---|
static final char ESCAPE_DOLLAR
Dollar ($) symbol for use in mapping element name characters to characters that can be used as Java name start characters.
This character is used by Java in the names of inner classes. The
application design must ensure that no XML element name will be mapped
to a name that identifies an inner class unless that inner class is an
ElementListener
.
static final char ESCAPE_CENT
Cent (¢) symbol for use in mapping element name characters to characters that can be used as Java name start characters.
static final char ESCAPE_POUND
Pound Sterling (£) symbol for use in mapping element name characters to characters that can be used as Java name start characters.
static final char ESCAPE_CURRENCY
Currency (¤) symbol for use in mapping element name characters to characters that can be used as Java name start characters.
static final char ESCAPE_YEN
Yen (¥) symbol for use in mapping element name characters to characters that can be used as Java name start characters.
Method Detail |
---|
void doElement(T parser, CurrentElement element) throws ListenerException, IOException
Maps an XML element to a handler for the element and invokes the handler on the element.
The handler will be equivalent to the
doElement
method of an ElementListener
.
doElement
in interface ElementListener<T extends Parser>
parser
- The Parser
that invoked this methodelement
- CurrentElement
instance with a
content handler
to parse the centent of the element.
ListenerException
- when the exception has been thrown from a
Listener
method.
ListenerRuntimeException
- if this method does not invoke the
content handler
exactly once before returning.
IOException
- when an input or output error occurs
NullPointerException
- when any parameter is null
ElementMapper.NotFoundException
- when a handler is not found
ElementMapper.InvalidHandlerException
- when the element name has been mapped
to a handler that cannot be invoked
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |