org.apache.jdo.jdoql.tree

Interface Node

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void arrive(NodeVisitor visitor)
      This method is called by the tree walker when this node is walked but its children have not been walked yet.
      Node[] getChildren()
      Returns this node's children.
      java.lang.Class getJavaClass()
      Returns the Java type of this node.
      java.lang.Object getObject()
      Returns the user object.
      Node getParent()
      Returns this node's parent node.
      int getTokenType()
      Returns the token type of this node.
      java.lang.Object leave(NodeVisitor visitor, java.lang.Object[] results)
      This method is called by the tree walker when this node is walked and all of its children have been walked.
      void setObject(java.lang.Object object)
      Sets the user object.
      void setParent(Node parent)
      Sets the parent of this node.
      boolean walkNextChild(NodeVisitor visitor, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
      This method is called by the tree walker after walking each child except the last child.
    • Method Detail

      • getObject

        java.lang.Object getObject()
        Returns the user object.
        Returns:
        the ouser object
      • setObject

        void setObject(java.lang.Object object)
        Sets the user object.
        Parameters:
        object - the user object
      • getParent

        Node getParent()
        Returns this node's parent node.
        Returns:
        the parent node
      • setParent

        void setParent(Node parent)
        Sets the parent of this node.
        Parameters:
        parent - the parent node
      • getChildren

        Node[] getChildren()
        Returns this node's children.
        Returns:
        the children
      • getJavaClass

        java.lang.Class getJavaClass()
        Returns the Java type of this node.
        Returns:
        the Java type
      • getTokenType

        int getTokenType()
        Returns the token type of this node.
        Returns:
        the token type
      • arrive

        void arrive(NodeVisitor visitor)
        This method is called by the tree walker when this node is walked but its children have not been walked yet. It delegates to the argument visitor.
        Parameters:
        visitor - the node visitor
      • leave

        java.lang.Object leave(NodeVisitor visitor,
                             java.lang.Object[] results)
        This method is called by the tree walker when this node is walked and all of its children have been walked. It delegates to the argument visitor. The argument results contains the result instances returned by all leave methods of this node's children. This method returns the result instance of the delegation call of the argument visitor.
        Parameters:
        visitor - the node visitor
        results - the result array containing result instances of this node's children
        Returns:
        the result instance of the delegation call of the argument visitor
      • walkNextChild

        boolean walkNextChild(NodeVisitor visitor,
                            java.lang.Object resultOfPreviousChild,
                            int indexOfNextChild)
        This method is called by the tree walker after walking each child except the last child. It delegates to the argument visitor. The argument resultOfPreviousChild contains the result instance returned by the leave method of the last walked child. The argument indicates the index of the next child in the children array returned by method getChildren. If this method returns false then the tree walker does not walk any more children of this node. Instead, it calls method leave immediately.
        Parameters:
        visitor - the node visitor
        resultOfPreviousChild - the result computed by leaving the previous child node
        indexOfNextChild - the index in the children array of the next child to walk
        Returns:
        false if remaining children should not be walked

Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.