org.apache.velocity.runtime.visitor
Class NodeViewMode

java.lang.Object
  extended by org.apache.velocity.runtime.visitor.BaseVisitor
      extended by org.apache.velocity.runtime.visitor.NodeViewMode
All Implemented Interfaces:
ParserVisitor

public class NodeViewMode
extends BaseVisitor

This class is simply a visitor implementation that traverses the AST, produced by the Velocity parsing process, and creates a visual structure of the AST. This is primarily used for debugging, but it useful for documentation as well.

Version:
$Id: NodeViewMode.java 151484 2005-02-05 07:09:52Z wglass $
Author:
Jason van Zyl

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.visitor.BaseVisitor
context, writer
 
Constructor Summary
NodeViewMode()
           
 
Method Summary
 Object visit(ASTAddNode node, Object data)
          Display an ASTAddNode ( + )
 Object visit(ASTAndNode node, Object data)
          Display an ASTAndNode ( && )
 Object visit(ASTAssignment node, Object data)
          Display an ASTAssignment node ( = )
 Object visit(ASTBlock node, Object data)
          Display an ASTBlock node
 Object visit(ASTDirective node, Object data)
           
 Object visit(ASTDivNode node, Object data)
          Display an ASTDivNode ( / )
 Object visit(ASTElseIfStatement node, Object data)
          Display an ASTElseIfStatement node
 Object visit(ASTElseStatement node, Object data)
          Display an ASTElseStatement node
 Object visit(ASTEQNode node, Object data)
          Display an ASTEQNode ( == )
 Object visit(ASTExpression node, Object data)
          Display an ASTExpression node
 Object visit(ASTFalse node, Object data)
          Display an ASTFalse node
 Object visit(ASTFloatingPointLiteral node, Object data)
          Display an ASTFloatingPointLiteral node
 Object visit(ASTGENode node, Object data)
          Display an ASTGENode ( >= )
 Object visit(ASTGTNode node, Object data)
          Display an ASTGTNode ( > )
 Object visit(ASTIdentifier node, Object data)
          Display an ASTIdentifier node
 Object visit(ASTIfStatement node, Object data)
          Display an ASTIfStatement node
 Object visit(ASTIntegerLiteral node, Object data)
          Display an ASTIntegerLiteral node
 Object visit(ASTLENode node, Object data)
          Display an ASTLENode ( <= )
 Object visit(ASTLTNode node, Object data)
          Display an ASTLTNode ( < )
 Object visit(ASTMethod node, Object data)
          Display an ASTMethod node
 Object visit(ASTModNode node, Object data)
          Display an ASTModNode ( % )
 Object visit(ASTMulNode node, Object data)
          Display an ASTMulNode ( * )
 Object visit(ASTNENode node, Object data)
          Display an ASTNENode ( !
 Object visit(ASTNotNode node, Object data)
          Display an ASTNotNode ( !
 Object visit(ASTObjectArray node, Object data)
           
 Object visit(ASTOrNode node, Object data)
          Display an ASTOrNode ( || )
 Object visit(ASTprocess node, Object data)
          Display an ASTprocess node
 Object visit(ASTReference node, Object data)
          Display an ASTReference node
 Object visit(ASTSetDirective node, Object data)
           
 Object visit(ASTStringLiteral node, Object data)
          Display an ASTStringLiteral node
 Object visit(ASTSubtractNode node, Object data)
          Display an ASTSubtractNode ( - )
 Object visit(ASTText node, Object data)
          Display an ASTText node
 Object visit(ASTTrue node, Object data)
          Display an ASTTrue node
 Object visit(ASTWord node, Object data)
           
 Object visit(SimpleNode node, Object data)
          Display a SimpleNode
 
Methods inherited from class org.apache.velocity.runtime.visitor.BaseVisitor
setContext, setWriter, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeViewMode

public NodeViewMode()
Method Detail

visit

public Object visit(SimpleNode node,
                    Object data)
Display a SimpleNode

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTprocess node,
                    Object data)
Display an ASTprocess node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTExpression node,
                    Object data)
Display an ASTExpression node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTAssignment node,
                    Object data)
Display an ASTAssignment node ( = )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTOrNode node,
                    Object data)
Display an ASTOrNode ( || )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTAndNode node,
                    Object data)
Display an ASTAndNode ( && )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTEQNode node,
                    Object data)
Display an ASTEQNode ( == )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTNENode node,
                    Object data)
Display an ASTNENode ( != )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTLTNode node,
                    Object data)
Display an ASTLTNode ( < )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTGTNode node,
                    Object data)
Display an ASTGTNode ( > )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTLENode node,
                    Object data)
Display an ASTLENode ( <= )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTGENode node,
                    Object data)
Display an ASTGENode ( >= )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTAddNode node,
                    Object data)
Display an ASTAddNode ( + )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTSubtractNode node,
                    Object data)
Display an ASTSubtractNode ( - )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTMulNode node,
                    Object data)
Display an ASTMulNode ( * )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTDivNode node,
                    Object data)
Display an ASTDivNode ( / )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTModNode node,
                    Object data)
Display an ASTModNode ( % )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTNotNode node,
                    Object data)
Display an ASTNotNode ( ! )

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTFloatingPointLiteral node,
                    Object data)
Display an ASTFloatingPointLiteral node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTIntegerLiteral node,
                    Object data)
Display an ASTIntegerLiteral node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTStringLiteral node,
                    Object data)
Display an ASTStringLiteral node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTIdentifier node,
                    Object data)
Display an ASTIdentifier node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTMethod node,
                    Object data)
Display an ASTMethod node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTReference node,
                    Object data)
Display an ASTReference node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTTrue node,
                    Object data)
Display an ASTTrue node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTFalse node,
                    Object data)
Display an ASTFalse node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTBlock node,
                    Object data)
Display an ASTBlock node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTText node,
                    Object data)
Display an ASTText node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTIfStatement node,
                    Object data)
Display an ASTIfStatement node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTElseStatement node,
                    Object data)
Display an ASTElseStatement node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTElseIfStatement node,
                    Object data)
Display an ASTElseIfStatement node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTObjectArray node,
                    Object data)
Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTDirective node,
                    Object data)
Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTWord node,
                    Object data)
Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor

visit

public Object visit(ASTSetDirective node,
                    Object data)
Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor


Copyright © 2002 Apache Software Foundation. All Rights Reserved.