Package com.saxonica.ee.stream.adjunct

## Class InspectionAdjunct

- java.lang.Object
- - com.saxonica.ee.stream.adjunct.StreamingAdjunct
  - - com.saxonica.ee.stream.adjunct.InspectionAdjunct

- Direct Known Subclasses:
    `AccumulatorAfterStreamer`, `BooleanFnStreamer`, `CountStreamer`, `EmptyStreamer`, `ExistsStreamer`, `InstanceOfAdjunct`, `NotFnStreamer`

      public abstract class InspectionAdjunct
      extends StreamingAdjunct

  Abstract superclass for constructs that have operand usage "inspection" on their primary (sequence-valued) operand

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InspectionAdjunct()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected WatchMaker` | `getInspectionWatchMaker​(Expression parent, Expression select, boolean forGrouping)` | This is a utility method for subclasses; it provides a WatchMaker suitable for all constructs that perform inspection on a sequence, for example exists(), count(), empty(), boolean(), not(), instanceOf.
    `WatchMaker` | `getWatchMaker​(boolean forGrouping)` | Get a WatchMaker, a factory class that creates a Watch to evaluate this expression in streaming mode.

    - ### Methods inherited from class com.saxonica.ee.stream.adjunct.StreamingAdjunct

      `computeStreamability, findConsumingArg, getConfiguration, getDefaultFeedMaker, getExpression, getFeedMaker, makeStreamingAdjunct, setConfiguration, setExpression, toStreamingPattern`

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

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

- - ### Constructor Detail

    - #### InspectionAdjunct

          public InspectionAdjunct()

  - ### Method Detail

    - #### getWatchMaker

          public WatchMaker getWatchMaker​(boolean forGrouping)
                                   throws XPathException

      Description copied from class: `StreamingAdjunct`
      Get a WatchMaker, a factory class that creates a Watch to evaluate this expression in streaming mode. This method will only be called if the getImplementationMethod() method of the expression includes the value `Expression.WATCH_METHOD`
      Overrides:
        `getWatchMaker` in class `StreamingAdjunct`
      Parameters:
        `forGrouping` - true if the selected items are being grouped
      Returns:
        a Watchmaker to evaluate the expression, or null if it is not streamable with respect to the specificed argument.
      Throws:
        `XPathException` - in the event of a failure

    - #### getInspectionWatchMaker

          protected final WatchMaker getInspectionWatchMaker​(Expression parent,
                                                             Expression select,
                                                             boolean forGrouping)
                                                      throws XPathException

      This is a utility method for subclasses; it provides a WatchMaker suitable for all constructs that perform inspection on a sequence, for example exists(), count(), empty(), boolean(), not(), instanceOf.
      Parameters:
        `parent` - the expression, typically one of the above function calls
        `select` - the argument to the inspection construct, typically the first argument of one of the above function calls
        `forGrouping` -
      Returns:
        a WatchMaker that feeds the selected nodes (as FleetingNode instances) to the Feed provided by this construct. Because this is an inspection construct, it is assumed able to compute the result by looking at the FleetingNode objects alone.
      Throws:
        `XPathException` - in the event of a dynamic error.