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 TypeMethodDescriptionvoidAdd a trace listener for the purposes of debugging and diagnosis.voidfireExtensionEndEvent(Method method, Object instance, Object[] arguments) Fire an end extension event.voidFire an end extension event.voidfireExtensionEvent(Method method, Object instance, Object[] arguments) Fire an end extension event.voidFire an end extension event.voidFire a generate event.voidfireSelectedEndEvent(int sourceNode, ElemTemplateElement styleNode, String attributeName, XPath xpath, XObject selection) Fire a selection event.voidFire a selection event.voidfireSelectedEvent(int sourceNode, ElemTemplateElement styleNode, String attributeName, XPath xpath, XObject selection) Fire a selection event.voidFire a selection event.voidfireTraceEndEvent(ElemTemplateElement styleNode) Fire a end trace event, after all children of an element have been executed.voidFire a trace event.voidfireTraceEvent(ElemTemplateElement styleNode) Fire a trace event.voidFire a trace event.booleanTell if trace listeners are present.voidRemove 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:
-