net.sf.saxon.trace

## Class XSLTTraceCodeInjector

- java.lang.Object
- - net.sf.saxon.trace.TraceCodeInjector
  - - net.sf.saxon.trace.XSLTTraceCodeInjector

- All Implemented Interfaces:
    CodeInjector

      public class XSLTTraceCodeInjector
      extends TraceCodeInjector

  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 and Description
    `XSLTTraceCodeInjector()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Expression` | `inject(Expression exp, StaticContext env, int construct, StructuredQName qName)` If tracing, wrap an expression in a trace instruction

    - ### Methods inherited from class net.sf.saxon.trace.TraceCodeInjector

      `injectClause`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XSLTTraceCodeInjector

          public XSLTTraceCodeInjector()

  - ### 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`
      Overrides:
        `inject` in class `TraceCodeInjector`
      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-2013 Saxonica Limited. All rights reserved.