org.apache.velocity.runtime.parser.node
Interface Node

All Known Implementing Classes:
SimpleNode

public interface Node

All AST nodes must implement this interface. It provides basic machinery for constructing the parent and child relationships between nodes.


Method Summary
 java.lang.Object childrenAccept(ParserVisitor visitor, java.lang.Object data)
           
 boolean evaluate(InternalContextAdapter context)
           
 java.lang.Object execute(java.lang.Object o, InternalContextAdapter context)
           
 int getColumn()
           
 Token getFirstToken()
           
 int getInfo()
           
 Token getLastToken()
           
 int getLine()
           
 int getType()
           
 java.lang.Object init(InternalContextAdapter context, java.lang.Object data)
           
 boolean isInvalid()
           
 java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
          Accept the visitor.
 void jjtAddChild(Node n, int i)
          This method tells the node to add its argument to the node's list of children.
 void jjtClose()
          This method is called after all the child nodes have been added.
 Node jjtGetChild(int i)
          This method returns a child node.
 int jjtGetNumChildren()
          Return the number of children the node has.
 Node jjtGetParent()
           
 void jjtOpen()
          This method is called after the node has been made the current node.
 void jjtSetParent(Node n)
          This pair of methods are used to inform the node of its parent.
 java.lang.String literal()
           
 boolean render(InternalContextAdapter context, java.io.Writer writer)
           
 void setInfo(int info)
           
 void setInvalid()
           
 java.lang.Object value(InternalContextAdapter context)
           
 

Method Detail

jjtOpen

public void jjtOpen()
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.

jjtClose

public void jjtClose()
This method is called after all the child nodes have been added.

jjtSetParent

public void jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent.

jjtGetParent

public Node jjtGetParent()

jjtAddChild

public void jjtAddChild(Node n,
                        int i)
This method tells the node to add its argument to the node's list of children.

jjtGetChild

public Node jjtGetChild(int i)
This method returns a child node. The children are numbered from zero, left to right.

jjtGetNumChildren

public int jjtGetNumChildren()
Return the number of children the node has.

jjtAccept

public java.lang.Object jjtAccept(ParserVisitor visitor,
                                  java.lang.Object data)
Accept the visitor.

childrenAccept

public java.lang.Object childrenAccept(ParserVisitor visitor,
                                       java.lang.Object data)

getFirstToken

public Token getFirstToken()

getLastToken

public Token getLastToken()

getType

public int getType()

init

public java.lang.Object init(InternalContextAdapter context,
                             java.lang.Object data)
                      throws java.lang.Exception

evaluate

public boolean evaluate(InternalContextAdapter context)
                 throws MethodInvocationException

value

public java.lang.Object value(InternalContextAdapter context)
                       throws MethodInvocationException

render

public boolean render(InternalContextAdapter context,
                      java.io.Writer writer)
               throws java.io.IOException,
                      MethodInvocationException,
                      ParseErrorException,
                      ResourceNotFoundException

execute

public java.lang.Object execute(java.lang.Object o,
                                InternalContextAdapter context)
                         throws MethodInvocationException

setInfo

public void setInfo(int info)

getInfo

public int getInfo()

literal

public java.lang.String literal()

setInvalid

public void setInvalid()

isInvalid

public boolean isInvalid()

getLine

public int getLine()

getColumn

public int getColumn()


Copyright © 2003 Apache Software Foundation. All Rights Reserved.