Package net.sf.saxon.trace
Class TimingCodeInjector
java.lang.Object
net.sf.saxon.trace.TraceCodeInjector
net.sf.saxon.trace.TimingCodeInjector
- All Implemented Interfaces:
CodeInjector
A code injector that wraps the body of a template or function in a TraceExpression, which causes
the TimingTraceListener to be notified at the start and end of the function/template evaluation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninject
(Expression exp, StaticContext env, int construct, StructuredQName qName) If tracing, wrap an expression in a trace instructioninjectClause
(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
-
Constructor Details
-
TimingCodeInjector
public TimingCodeInjector()
-
-
Method Details
-
inject
If tracing, wrap an expression in a trace instruction- Specified by:
inject
in interfaceCodeInjector
- Overrides:
inject
in classTraceCodeInjector
- 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
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
- Overrides:
injectClause
in classTraceCodeInjector
- 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
-