Package net.sf.saxon.trace
Class TraceCodeInjector
- java.lang.Object
-
- net.sf.saxon.trace.TraceCodeInjector
-
- All Implemented Interfaces:
CodeInjector
- Direct Known Subclasses:
TimingCodeInjector
,XSLTTraceCodeInjector
public class TraceCodeInjector extends java.lang.Object implements CodeInjector
A code injector that wraps every expression (other than a literal) in a TraceExpression, which causes a TraceListener to be notified when the expression is evaluated
-
-
Constructor Summary
Constructors Constructor Description TraceCodeInjector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression
inject(Expression exp, StaticContext env, int construct, StructuredQName qName)
If tracing, wrap an expression in a trace instructionClause
injectClause(Clause target, StaticContext env, Container container)
If tracing, add a clause to a FLWOR expression that can be used to monitor requests for tuples to be processed
-
-
-
Method Detail
-
inject
public Expression inject(Expression exp, StaticContext env, int construct, StructuredQName qName)
If tracing, wrap an expression in a trace instruction- Specified by:
inject
in interfaceCodeInjector
- Parameters:
exp
- the expression to be wrappedenv
- the static contextconstruct
- integer constant identifying the kind of constructqName
- the name of the construct (if applicable)- Returns:
- the expression that does the tracing
-
injectClause
public Clause injectClause(Clause target, StaticContext env, Container container)
If tracing, add a clause to a FLWOR expression that can be used to monitor requests for tuples to be processed- Specified by:
injectClause
in interfaceCodeInjector
- Parameters:
target
- the clause whose evaluation is to be traced (or otherwise monitored)env
-container
- the container of the containing FLWORExpression @return the new clause to do the tracing; or null if no tracing is required at this point
-
-