Package org.apache.xml.serializer
Interface SerializerTrace
- All Known Implementing Classes:
TransformerImpl
public interface SerializerTrace
This interface defines a set of integer constants that identify trace event
types.
-
Field Summary
Fields Modifier and Type Field Description static intEVENTTYPE_CDATAEvent type generated after CDATA is generated.static intEVENTTYPE_CHARACTERSEvent type generated for character data (CDATA and Ignorable Whitespace have their own events).static intEVENTTYPE_COMMENTEvent type generated after a comment has been added.static intEVENTTYPE_ENDDOCUMENTEvent type generated when a document ends.static intEVENTTYPE_ENDELEMENTEvent type generated when an element ends, after it's children have been added.static intEVENTTYPE_ENTITYREFEvent type generate after an entity ref is created.static intEVENTTYPE_IGNORABLEWHITESPACEEvent type generated for ignorable whitespace (I'm not sure how much this is actually called.static intEVENTTYPE_OUTPUT_CHARACTERSEvent type generated when characters are written to an output stream.static intEVENTTYPE_OUTPUT_PSEUDO_CHARACTERSEvent type generated when characters might be written to an output stream, but these characters never are.static intEVENTTYPE_PIEvent type generated for processing instructions.static intEVENTTYPE_STARTDOCUMENTEvent type generated when a document begins.static intEVENTTYPE_STARTELEMENTEvent type generated when an element begins (after the attributes have been processed but before the children have been added). -
Method Summary
Modifier and Type Method Description voidfireGenerateEvent(int eventType)Fire startDocument, endDocument events.voidfireGenerateEvent(int eventType, char[] ch, int start, int length)Fire characters, cdata events.voidfireGenerateEvent(int eventType, String data)Fire comment and entity ref events.voidfireGenerateEvent(int eventType, String name, String data)Fire processingInstruction events.voidfireGenerateEvent(int eventType, String name, Attributes atts)Fire startElement, endElement events.booleanhasTraceListeners()Tell if trace listeners are present.
-
Field Details
-
EVENTTYPE_STARTDOCUMENT
static final int EVENTTYPE_STARTDOCUMENTEvent type generated when a document begins.- See Also:
- Constant Field Values
-
EVENTTYPE_ENDDOCUMENT
static final int EVENTTYPE_ENDDOCUMENTEvent type generated when a document ends.- See Also:
- Constant Field Values
-
EVENTTYPE_STARTELEMENT
static final int EVENTTYPE_STARTELEMENTEvent type generated when an element begins (after the attributes have been processed but before the children have been added).- See Also:
- Constant Field Values
-
EVENTTYPE_ENDELEMENT
static final int EVENTTYPE_ENDELEMENTEvent type generated when an element ends, after it's children have been added.- See Also:
- Constant Field Values
-
EVENTTYPE_CHARACTERS
static final int EVENTTYPE_CHARACTERSEvent type generated for character data (CDATA and Ignorable Whitespace have their own events).- See Also:
- Constant Field Values
-
EVENTTYPE_IGNORABLEWHITESPACE
static final int EVENTTYPE_IGNORABLEWHITESPACEEvent type generated for ignorable whitespace (I'm not sure how much this is actually called.- See Also:
- Constant Field Values
-
EVENTTYPE_PI
static final int EVENTTYPE_PIEvent type generated for processing instructions.- See Also:
- Constant Field Values
-
EVENTTYPE_COMMENT
static final int EVENTTYPE_COMMENTEvent type generated after a comment has been added.- See Also:
- Constant Field Values
-
EVENTTYPE_ENTITYREF
static final int EVENTTYPE_ENTITYREFEvent type generate after an entity ref is created.- See Also:
- Constant Field Values
-
EVENTTYPE_CDATA
static final int EVENTTYPE_CDATAEvent type generated after CDATA is generated.- See Also:
- Constant Field Values
-
EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS
static final int EVENTTYPE_OUTPUT_PSEUDO_CHARACTERSEvent type generated when characters might be written to an output stream, but these characters never are. They will ultimately be written out via EVENTTYPE_OUTPUT_CHARACTERS. This type is used as attributes are collected. Whenever the attributes change this event type is fired. At the very end however, when the attributes do not change anymore and are going to be ouput to the document the real characters will be written out using the EVENTTYPE_OUTPUT_CHARACTERS.- See Also:
- Constant Field Values
-
EVENTTYPE_OUTPUT_CHARACTERS
static final int EVENTTYPE_OUTPUT_CHARACTERSEvent type generated when characters are written to an output stream.- See Also:
- Constant Field Values
-
-
Method Details
-
hasTraceListeners
boolean hasTraceListeners()Tell if trace listeners are present.- Returns:
- True if there are trace listeners
-
fireGenerateEvent
void fireGenerateEvent(int eventType)Fire startDocument, endDocument events.- Parameters:
eventType- One of the EVENTTYPE_XXX constants.
-
fireGenerateEvent
Fire startElement, endElement events.- Parameters:
eventType- One of the EVENTTYPE_XXX constants.name- The name of the element.atts- The SAX attribute list.
-
fireGenerateEvent
void fireGenerateEvent(int eventType, char[] ch, int start, int length)Fire characters, cdata events.- Parameters:
eventType- One of the EVENTTYPE_XXX constants.ch- The char array from the SAX event.start- The start offset to be used in the char array.length- The end offset to be used in the chara array.
-
fireGenerateEvent
Fire processingInstruction events.- Parameters:
eventType- One of the EVENTTYPE_XXX constants.name- The name of the processing instruction.data- The processing instruction data.
-
fireGenerateEvent
Fire comment and entity ref events.- Parameters:
eventType- One of the EVENTTYPE_XXX constants.data- The comment or entity ref data.
-