NodeViewMode (Velocity 1.4 API)
Keywords: org.apache.velocity.runtime.visitor.NodeViewMode class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.visitor
Class NodeViewMode

    java.lang.Object
      org.apache.velocity.runtime.visitor.BaseVisitor
          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,v 1.6.4.1 2004/03/03 23:23:03 geirm Exp $
Author:
  Jason van Zyl

Field Summary
`private int` | `indent`
`private boolean` | `showTokens`

Fields inherited from class org.apache.velocity.runtime.visitor.BaseVisitor
`context, writer`

Constructor Summary
`NodeViewMode()`

Method Summary
`private java.lang.String` | `indentString()` Indent child nodes to help visually identify the structure of the AST.
`private java.lang.Object` | `showNode(Node node, java.lang.Object data)` Display the type of nodes and optionally the first token.
`java.lang.Object` | `visit(ASTAddNode node, java.lang.Object data)` Display an ASTAddNode ( + )
`java.lang.Object` | `visit(ASTAndNode node, java.lang.Object data)` Display an ASTAndNode ( && )
`java.lang.Object` | `visit(ASTAssignment node, java.lang.Object data)` Display an ASTAssignment node ( = )
`java.lang.Object` | `visit(ASTBlock node, java.lang.Object data)` Display an ASTBlock node
`java.lang.Object` | `visit(ASTDirective node, java.lang.Object data)`
`java.lang.Object` | `visit(ASTDivNode node, java.lang.Object data)` Display an ASTDivNode ( / )
`java.lang.Object` | `visit(ASTElseIfStatement node, java.lang.Object data)` Display an ASTElseIfStatement node
`java.lang.Object` | `visit(ASTElseStatement node, java.lang.Object data)` Display an ASTElseStatement node
`java.lang.Object` | `visit(ASTEQNode node, java.lang.Object data)` Display an ASTEQNode ( == )
`java.lang.Object` | `visit(ASTExpression node, java.lang.Object data)` Display an ASTExpression node
`java.lang.Object` | `visit(ASTFalse node, java.lang.Object data)` Display an ASTFalse node
`java.lang.Object` | `visit(ASTGENode node, java.lang.Object data)` Display an ASTGENode ( >= )
`java.lang.Object` | `visit(ASTGTNode node, java.lang.Object data)` Display an ASTGTNode ( > )
`java.lang.Object` | `visit(ASTIdentifier node, java.lang.Object data)` Display an ASTIdentifier node
`java.lang.Object` | `visit(ASTIfStatement node, java.lang.Object data)` Display an ASTIfStatement node
`java.lang.Object` | `visit(ASTLENode node, java.lang.Object data)` Display an ASTLENode ( <= )
`java.lang.Object` | `visit(ASTLTNode node, java.lang.Object data)` Display an ASTLTNode ( < )
`java.lang.Object` | `visit(ASTMethod node, java.lang.Object data)` Display an ASTMethod node
`java.lang.Object` | `visit(ASTModNode node, java.lang.Object data)` Display an ASTModNode ( % )
`java.lang.Object` | `visit(ASTMulNode node, java.lang.Object data)` Display an ASTMulNode ( * )
`java.lang.Object` | `visit(ASTNENode node, java.lang.Object data)` Display an ASTNENode ( != )
`java.lang.Object` | `visit(ASTNotNode node, java.lang.Object data)` Display an ASTNotNode ( ! )
`java.lang.Object` | `visit(ASTNumberLiteral node, java.lang.Object data)` Display an ASTNumberLiteral node
`java.lang.Object` | `visit(ASTObjectArray node, java.lang.Object data)`
`java.lang.Object` | `visit(ASTOrNode node, java.lang.Object data)` Display an ASTOrNode ( || )
`java.lang.Object` | `visit(ASTprocess node, java.lang.Object data)` Display an ASTprocess node
`java.lang.Object` | `visit(ASTReference node, java.lang.Object data)` Display an ASTReference node
`java.lang.Object` | `visit(ASTSetDirective node, java.lang.Object data)`
`java.lang.Object` | `visit(ASTStringLiteral node, java.lang.Object data)` Display an ASTStringLiteral node
`java.lang.Object` | `visit(ASTSubtractNode node, java.lang.Object data)` Display an ASTSubtractNode ( - )
`java.lang.Object` | `visit(ASTText node, java.lang.Object data)` Display an ASTText node
`java.lang.Object` | `visit(ASTTrue node, java.lang.Object data)` Display an ASTTrue node
`java.lang.Object` | `visit(ASTWord node, java.lang.Object data)`
`java.lang.Object` | `visit(SimpleNode node, java.lang.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`

Field Detail

### indent

    private int indent

### showTokens

    private boolean showTokens

Constructor Detail

### NodeViewMode

    public NodeViewMode()

Method Detail

### indentString

    private java.lang.String indentString()

  Indent child nodes to help visually identify the structure of the AST.

### showNode

    private java.lang.Object showNode(Node node,
                                      java.lang.Object data)

  Display the type of nodes and optionally the first token.

### visit

    public java.lang.Object visit(SimpleNode node,
                                  java.lang.Object data)

  Display a SimpleNode

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

### visit

    public java.lang.Object visit(ASTprocess node,
                                  java.lang.Object data)

  Display an ASTprocess node

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

### visit

    public java.lang.Object visit(ASTExpression node,
                                  java.lang.Object data)

  Display an ASTExpression node

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

### visit

    public java.lang.Object visit(ASTAssignment node,
                                  java.lang.Object data)

  Display an ASTAssignment node ( = )

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

### visit

    public java.lang.Object visit(ASTOrNode node,
                                  java.lang.Object data)

  Display an ASTOrNode ( || )

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

### visit

    public java.lang.Object visit(ASTAndNode node,
                                  java.lang.Object data)

  Display an ASTAndNode ( && )

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

### visit

    public java.lang.Object visit(ASTEQNode node,
                                  java.lang.Object data)

  Display an ASTEQNode ( == )

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

### visit

    public java.lang.Object visit(ASTNENode node,
                                  java.lang.Object data)

  Display an ASTNENode ( != )

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

### visit

    public java.lang.Object visit(ASTLTNode node,
                                  java.lang.Object data)

  Display an ASTLTNode ( < )

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

### visit

    public java.lang.Object visit(ASTGTNode node,
                                  java.lang.Object data)

  Display an ASTGTNode ( > )

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

### visit

    public java.lang.Object visit(ASTLENode node,
                                  java.lang.Object data)

  Display an ASTLENode ( <= )

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

### visit

    public java.lang.Object visit(ASTGENode node,
                                  java.lang.Object data)

  Display an ASTGENode ( >= )

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

### visit

    public java.lang.Object visit(ASTAddNode node,
                                  java.lang.Object data)

  Display an ASTAddNode ( + )

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

### visit

    public java.lang.Object visit(ASTSubtractNode node,
                                  java.lang.Object data)

  Display an ASTSubtractNode ( - )

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

### visit

    public java.lang.Object visit(ASTMulNode node,
                                  java.lang.Object data)

  Display an ASTMulNode ( * )

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

### visit

    public java.lang.Object visit(ASTDivNode node,
                                  java.lang.Object data)

  Display an ASTDivNode ( / )

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

### visit

    public java.lang.Object visit(ASTModNode node,
                                  java.lang.Object data)

  Display an ASTModNode ( % )

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

### visit

    public java.lang.Object visit(ASTNotNode node,
                                  java.lang.Object data)

  Display an ASTNotNode ( ! )

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

### visit

    public java.lang.Object visit(ASTNumberLiteral node,
                                  java.lang.Object data)

  Display an ASTNumberLiteral node

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

### visit

    public java.lang.Object visit(ASTStringLiteral node,
                                  java.lang.Object data)

  Display an ASTStringLiteral node

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

### visit

    public java.lang.Object visit(ASTIdentifier node,
                                  java.lang.Object data)

  Display an ASTIdentifier node

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

### visit

    public java.lang.Object visit(ASTMethod node,
                                  java.lang.Object data)

  Display an ASTMethod node

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

### visit

    public java.lang.Object visit(ASTReference node,
                                  java.lang.Object data)

  Display an ASTReference node

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

### visit

    public java.lang.Object visit(ASTTrue node,
                                  java.lang.Object data)

  Display an ASTTrue node

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

### visit

    public java.lang.Object visit(ASTFalse node,
                                  java.lang.Object data)

  Display an ASTFalse node

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

### visit

    public java.lang.Object visit(ASTBlock node,
                                  java.lang.Object data)

  Display an ASTBlock node

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

### visit

    public java.lang.Object visit(ASTText node,
                                  java.lang.Object data)

  Display an ASTText node

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

### visit

    public java.lang.Object visit(ASTIfStatement node,
                                  java.lang.Object data)

  Display an ASTIfStatement node

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

### visit

    public java.lang.Object visit(ASTElseStatement node,
                                  java.lang.Object data)

  Display an ASTElseStatement node

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

### visit

    public java.lang.Object visit(ASTElseIfStatement node,
                                  java.lang.Object data)

  Display an ASTElseIfStatement node

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

### visit

    public java.lang.Object visit(ASTObjectArray node,
                                  java.lang.Object data)

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

### visit

    public java.lang.Object visit(ASTDirective node,
                                  java.lang.Object data)

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

### visit

    public java.lang.Object visit(ASTWord node,
                                  java.lang.Object data)

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

### visit

    public java.lang.Object visit(ASTSetDirective node,
                                  java.lang.Object data)

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 Apache Software Foundation. All Rights Reserved.