Package net.sf.saxon.expr.parser
Interface CodeInjector
- All Known Implementing Classes:
TimingCodeInjector,TraceCodeInjector,XSLTTraceCodeInjector
public interface CodeInjector
A code injector can be used to add code to the expression tree (for example, diagnostic tracing code)
during the process of parsing and tree construction
-
Method Summary
Modifier and TypeMethodDescriptioninject(Expression exp, StaticContext env, int construct, StructuredQName qName) Wrap an expression in a diagnostic expression.injectClause(Clause target, StaticContext env) Insert a tracing clause into the pipeline of clauses that evaluates a FLWOR expression
-
Method Details
-
inject
Wrap an expression in a diagnostic expression.- 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:
- a replacement for the original expression (or the original expression unchanged). Normally the new expression will collect or output some diagnostic information and then invoke the original expression. However this is not required; the new expression could be a complete replacement for the original.
-
injectClause
Insert a tracing clause into the pipeline of clauses that evaluates a FLWOR expression- Parameters:
target- the clause whose execution is being tracedenv- the static context of the containing FLWOR expression
-