net.sf.saxon.trace
Class TraceCodeInjector

java.lang.Object
  extended by net.sf.saxon.trace.TraceCodeInjector
All Implemented Interfaces:
CodeInjector
Direct Known Subclasses:
TimingCodeInjector, XSLTTraceCodeInjector

public class TraceCodeInjector
extends 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
TraceCodeInjector()
           
 
Method Summary
 Expression inject(Expression exp, StaticContext env, int construct, StructuredQName qName)
          If tracing, wrap an expression in a trace instruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraceCodeInjector

public TraceCodeInjector()
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 interface CodeInjector
Parameters:
exp - the expression to be wrapped
env - the static context
construct - integer constant identifying the kind of construct
qName - the name of the construct (if applicable)
Returns:
the expression that does the tracing


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.