Class FilterExprWalker

    • Field Detail

      • m_expr

        private Expression m_expr
        The contained expression. Should be non-null.
      • m_exprObj

        private transient XNodeSet m_exprObj
        The result of executing m_expr. Needs to be deep cloned on clone op.
    • Constructor Detail

      • FilterExprWalker

        public FilterExprWalker​(WalkingIterator locPathIterator)
        Construct a FilterExprWalker using a LocPathIterator.
        Parameters:
        locPathIterator - non-null reference to the parent iterator.
    • Method Detail

      • init

        public void init​(Compiler compiler,
                         int opPos,
                         int stepType)
                  throws javax.xml.transform.TransformerException
        Initialize an AxesWalker during the parse of the XPath expression.
        Overrides:
        init in class AxesWalker
        Parameters:
        compiler - The Compiler object that has information about this walker in the op map.
        opPos - The op code position of this location step.
        stepType - The type of location step.
        Throws:
        javax.xml.transform.TransformerException - if any
      • detach

        public void detach()
        Detaches the walker from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.
        Overrides:
        detach in class AxesWalker
      • setRoot

        public void setRoot​(int root)
        Set the root node of the TreeWalker. (Not part of the DOM2 TreeWalker interface).
        Overrides:
        setRoot in class AxesWalker
        Parameters:
        root - The context node of this step.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class AxesWalker
        Throws:
        java.lang.CloneNotSupportedException
      • acceptNode

        public short acceptNode​(int n)
        Test whether a specified node is visible in the logical view of a TreeWalker or NodeIterator. This function will be called by the implementation of TreeWalker and NodeIterator; it is not intended to be called directly from user code.
        Overrides:
        acceptNode in class PredicatedNodeTest
        Parameters:
        n - The node to check to see if it passes the filter or not.
        Returns:
        a constant to determine whether the node is accepted, rejected, or skipped, as defined above .
      • getNextNode

        public int getNextNode()
        Get the next node in document order on the axes.
        Overrides:
        getNextNode in class AxesWalker
        Returns:
        the next node in document order on the axes, or null.
      • getLastPos

        public int getLastPos​(XPathContext xctxt)
        Get the number of nodes in the node list, which, in the XSLT 1 based counting system, is the last index position.
        Specified by:
        getLastPos in interface SubContextList
        Overrides:
        getLastPos in class AxesWalker
        Parameters:
        xctxt - The XPath runtime context.
        Returns:
        the number of nodes in the node list.
      • getAnalysisBits

        public int getAnalysisBits()
        Get the analysis bits for this path component, as defined in the WalkerFactory.
        Specified by:
        getAnalysisBits in interface PathComponent
        Overrides:
        getAnalysisBits in class AxesWalker
        Returns:
        One of WalkerFactory#BIT_DESCENDANT, etc.
      • getAxis

        public int getAxis()
        Returns the axis being iterated, if it is known.
        Overrides:
        getAxis in class AxesWalker
        Returns:
        Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.
      • callPredicateVisitors

        public void callPredicateVisitors​(XPathVisitor visitor)
        This will traverse the heararchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.
        Overrides:
        callPredicateVisitors in class PredicatedNodeTest
        Parameters:
        visitor - The visitor whose appropriate method will be called.
      • deepEquals

        public boolean deepEquals​(Expression expr)
        Compare this object with another object and see if they are equal, include the sub heararchy.
        Overrides:
        deepEquals in class AxesWalker
        Parameters:
        expr - Another expression object.
        Returns:
        true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.