Package com.saxonica.ee.stream

## Class ComponentInversion

- java.lang.Object
- - com.saxonica.ee.stream.ComponentInversion

-     public class ComponentInversion
      extends java.lang.Object

  This class represents the inversion of a template or function body

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ComponentInversion​(Expression body)` | Create the Jackson inversion of a template or function, allowing the template or function to execute on a streamed input source.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `explain​(ExpressionPresenter presenter)` | Output diagnostic explanation to an ExpressionPresenter
    `Inversion` | `getInversion()` |
    `SlotManager` | `getStackFrame()` | Get the stackframe identifying the slots used for local variables
    `Watch` | `getWatch​(WatchManager wm, ItemFeed result, XPathContext context)` | Get a Watch associated with this template, if any.
    `void` | `invert​(boolean isW3CStreamable)` | Invert the body of the template.
    `void` | `setStackFrame​(SlotManager frame)` | Set the stackframe identifying the slots used for local variables

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

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

- - ### Constructor Detail

    - #### ComponentInversion

          public ComponentInversion​(Expression body)

      Create the Jackson inversion of a template or function, allowing the template or function to execute on a streamed input source.
      Parameters:
        `body` - the body of the template to be inverted

  - ### Method Detail

    - #### getWatch

          public Watch getWatch​(WatchManager wm,
                                ItemFeed result,
                                XPathContext context)
                         throws XPathException

      Get a Watch associated with this template, if any. This creates a watch to implement the "drill-down" instruction of the inverted template, for example if the drill-down instruction is `<xsl:copy-of select="a/b/c">` then it returns a `CopyOfFeed` with that expression as its selection.
      Parameters:
        `wm` - the WatchManager which keeps track of all active Watches
        `result` - the destination for the output of this Watch
        `context` - the stack of dynamic context objects for the active Watches
      Returns:
        the Watch if there is one, or null otherwise.
      Throws:
        `XPathException` - if an error occurs

    - #### invert

          public void invert​(boolean isW3CStreamable)
                      throws XPathException

      Invert the body of the template.
      Throws:
        `XPathException` - if the template is non-streamable

    - #### setStackFrame

          public void setStackFrame​(SlotManager frame)

      Set the stackframe identifying the slots used for local variables
      Parameters:
        `frame` - the stack frame skeleton

    - #### getStackFrame

          public SlotManager getStackFrame()

      Get the stackframe identifying the slots used for local variables
      Returns:
        the stack frame skeleton

    - #### getInversion

          public Inversion getInversion()

    - #### explain

          public void explain​(ExpressionPresenter presenter)
                       throws XPathException

      Output diagnostic explanation to an ExpressionPresenter
      Parameters:
        `presenter` - the destination for the output
      Throws:
        `XPathException`