Package org.apache.xalan.trace
Class TraceManager
java.lang.Object
org.apache.xalan.trace.TraceManager
This class manages trace listeners, and acts as an
interface for the tracing functionality in Xalan.
-
Constructor Summary
ConstructorsConstructorDescriptionTraceManager
(TransformerImpl transformer) Constructor for the trace manager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a trace listener for the purposes of debugging and diagnosis.void
fireExtensionEndEvent
(Method method, Object instance, Object[] arguments) Fire an end extension event.void
Fire an end extension event.void
fireExtensionEvent
(Method method, Object instance, Object[] arguments) Fire an end extension event.void
Fire an end extension event.void
Fire a generate event.void
fireSelectedEndEvent
(int sourceNode, ElemTemplateElement styleNode, String attributeName, XPath xpath, XObject selection) Fire a selection event.void
Fire a selection event.void
fireSelectedEvent
(int sourceNode, ElemTemplateElement styleNode, String attributeName, XPath xpath, XObject selection) Fire a selection event.void
Fire a selection event.void
fireTraceEndEvent
(ElemTemplateElement styleNode) Fire a end trace event, after all children of an element have been executed.void
Fire a trace event.void
fireTraceEvent
(ElemTemplateElement styleNode) Fire a trace event.void
Fire a trace event.boolean
Tell if trace listeners are present.void
Remove a trace listener.
-
Constructor Details
-
TraceManager
Constructor for the trace manager.- Parameters:
transformer
- a non-null instance of a transformer
-
-
Method Details
-
addTraceListener
Add a trace listener for the purposes of debugging and diagnosis.- Parameters:
tl
- Trace listener to be added.- Throws:
TooManyListenersException
-
removeTraceListener
Remove a trace listener.- Parameters:
tl
- Trace listener to be removed.
-
fireGenerateEvent
Fire a generate event.- Parameters:
te
- Generate Event to fire
-
hasTraceListeners
public boolean hasTraceListeners()Tell if trace listeners are present.- Returns:
- True if there are trace listeners
-
fireTraceEvent
Fire a trace event.- Parameters:
styleNode
- Stylesheet template node
-
fireTraceEndEvent
Fire a end trace event, after all children of an element have been executed.- Parameters:
styleNode
- Stylesheet template node
-
fireTraceEndEvent
Fire a trace event.- Parameters:
te
- Trace event to fire
-
fireTraceEvent
Fire a trace event.- Parameters:
te
- Trace event to fire
-
fireSelectedEvent
public void fireSelectedEvent(int sourceNode, ElemTemplateElement styleNode, String attributeName, XPath xpath, XObject selection) throws TransformerException Fire a selection event.- Parameters:
sourceNode
- Current source nodestyleNode
- node in the style tree reference for the event.attributeName
- The attribute name from which the selection is made.xpath
- The XPath that executed the selection.selection
- The result of the selection.- Throws:
TransformerException
-
fireSelectedEndEvent
public void fireSelectedEndEvent(int sourceNode, ElemTemplateElement styleNode, String attributeName, XPath xpath, XObject selection) throws TransformerException Fire a selection event.- Parameters:
sourceNode
- Current source nodestyleNode
- node in the style tree reference for the event.attributeName
- The attribute name from which the selection is made.xpath
- The XPath that executed the selection.selection
- The result of the selection.- Throws:
TransformerException
-
fireSelectedEndEvent
Fire a selection event.- Parameters:
se
- Selection event to fire- Throws:
TransformerException
-
fireSelectedEvent
Fire a selection event.- Parameters:
se
- Selection event to fire- Throws:
TransformerException
-
fireExtensionEndEvent
Fire an end extension event.- Parameters:
method
- The java method about to be executedinstance
- The instance the method will be executed onarguments
- Parameters passed to the method.- See Also:
-
fireExtensionEvent
Fire an end extension event.- Parameters:
method
- The java method about to be executedinstance
- The instance the method will be executed onarguments
- Parameters passed to the method.- See Also:
-
fireExtensionEndEvent
Fire an end extension event.- Parameters:
ee
- the ExtensionEvent to fire- See Also:
-
fireExtensionEvent
Fire an end extension event.- Parameters:
ee
- the ExtensionEvent to fire- See Also:
-