|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xsl.debug.Trace
A class that supports tracing of the XSL processor's operation.
Field Summary | |
static boolean |
ENABLED
Flag that enables or disables tracing. |
static int |
TRACE_OFF
Trace level 0. |
static int |
TRACE_RULE_INSTANTIATIONS
Trace level 2. |
static int |
TRACE_RULE_MATCHING
Trace level 4. |
static int |
TRACE_SOURCE_PROCESSING
Trace level 1. |
static int |
TRACE_TEMPLATE_INSTANTIATIONS
Trace level 3. |
Method Summary | |
static int |
getTraceLevel()
Returns the current trace level. |
static void |
setPrintWriter(PrintWriter printWriter)
Sets the PrintWriter to which trace information is written. |
static void |
setTraceLevel(int traceLevel)
Sets the trace level; throws an exception if a PrintWriter
is not set. |
static void |
traceMatch(String msg)
Prints part of a trace message giving details about rule matching. |
static void |
traceRuleBegin(Rule rule)
Prints the beginning of a trace message indicating that the specified rule is about to be instantiated. |
static void |
traceRuleBuiltIn(Rule rule)
Prints a trace message indicating that the specified built-in rule is about to be instantiated. |
static void |
traceRuleEnd(Rule rule)
Prints the end of a trace message indicating that the specified rule is about to be instantiated. |
static void |
traceSelect(Expression expr,
ExpressionValue result)
Prints a trace message giving details about a select expression |
static void |
traceSortKey(String msg)
Prints a trace message giving details about a sort key evaluation |
static void |
traceSource(Node node,
Mode mode)
Prints a trace message indicating that the specified source node is about to be processed in the specified mode. |
static void |
traceTemplate(String msg)
Prints a trace message indicating that a template is about to be instantiated. |
static void |
traceTemplate(String msg,
Mode mode)
Prints a trace message indicating that a template is about to be instantiated in the specified mode. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean ENABLED
false
, most compilers' optimizers, including
javac -O
, should be able to eliminate any runtime
cost. Note that this is a compile-time setting versus the trace level
which is a runtime setting.
public static final int TRACE_OFF
public static final int TRACE_SOURCE_PROCESSING
public static final int TRACE_RULE_INSTANTIATIONS
public static final int TRACE_TEMPLATE_INSTANTIATIONS
public static final int TRACE_RULE_MATCHING
Method Detail |
public static void setPrintWriter(PrintWriter printWriter)
PrintWriter
to which trace information is written.
printWriter
- the PrintWriter
to which trace
information is writtensetTraceLevel(int)
public static int getTraceLevel()
setTraceLevel(int)
public static void setTraceLevel(int traceLevel)
PrintWriter
is not set. The default trace level is TRACE_OFF
.
traceLevel
- the level of detail to trace; one of the
TRACE_
constants
IllegalArgumentException
- if traceLevel is out of range
IllegalStateException
- if a PrintWriter
is not setsetPrintWriter(java.io.PrintWriter)
public static void traceSource(Node node, Mode mode)
node
- the source node that is about to be processedmode
- the mode in which the node is about to be processedpublic static void traceRuleBegin(Rule rule)
rule
- the rule that is about to be instantiatedpublic static void traceRuleEnd(Rule rule)
rule
- the rule that is about to be instantiatedpublic static void traceRuleBuiltIn(Rule rule)
rule
- the built-in rule that is about to be instantiated;
null
means there is no applicable built-in
rulepublic static void traceTemplate(String msg)
msg
- a description of the template that is about to be
instantiatedpublic static void traceTemplate(String msg, Mode mode)
msg
- a description of the template that is about to be
instantiatedmode
- the mode in which the template is about to be
instantiatedpublic static void traceMatch(String msg)
msg
- the string to be printedpublic static void traceSelect(Expression expr, ExpressionValue result)
expr
- The expression that was evaluatedresult
- The result of the expression evaluationpublic static void traceSortKey(String msg)
msg
- Message giving details about the key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |