Package net.sf.saxon.expr.accum

## Class AccumulatorRule

- java.lang.Object
- - net.sf.saxon.expr.accum.AccumulatorRule

- All Implemented Interfaces:
    `RuleTarget`

      public class AccumulatorRule
      extends java.lang.Object
      implements RuleTarget

  This class represents one of the rules making up the definition of an accumulator

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AccumulatorRule​(Expression newValueExpression, SlotManager stackFrameMap, boolean postDescent)` | Create a rule

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `export​(ExpressionPresenter out)` | Output diagnostic explanation to an ExpressionPresenter
    `Expression` | `getNewValueExpression()` |
    `SlotManager` | `getStackFrameMap()` |
    `boolean` | `isCapturing()` |
    `boolean` | `isPostDescent()` |
    `void` | `registerRule​(Rule rule)` | Register a rule for which this is the target
    `void` | `setCapturing​(boolean capturing)` |

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

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

- - ### Constructor Detail

    - #### AccumulatorRule

          public AccumulatorRule​(Expression newValueExpression,
                                 SlotManager stackFrameMap,
                                 boolean postDescent)

      Create a rule
      Parameters:
        `newValueExpression` - the expression that computes a new value of the accumulator function
        `stackFrameMap` - the stack frame used to evaluate this expression

  - ### Method Detail

    - #### getNewValueExpression

          public Expression getNewValueExpression()

    - #### export

          public void export​(ExpressionPresenter out)
                      throws XPathException

      Description copied from interface: `RuleTarget`
      Output diagnostic explanation to an ExpressionPresenter
      Specified by:
        `export` in interface `RuleTarget`
      Parameters:
        `out` - the destination for the explanation
      Throws:
        `XPathException` - if output fails

    - #### getStackFrameMap

          public SlotManager getStackFrameMap()

    - #### registerRule

          public void registerRule​(Rule rule)

      Register a rule for which this is the target
      Specified by:
        `registerRule` in interface `RuleTarget`
      Parameters:
        `rule` - a rule in which this is the target

    - #### setCapturing

          public void setCapturing​(boolean capturing)

    - #### isCapturing

          public boolean isCapturing()

    - #### isPostDescent

          public boolean isPostDescent()