org.apache.velocity.test.view

Class TemplateNodeView


public class TemplateNodeView
extends java.lang.Object

Simple class for dumping the AST for a template. Good for debugging and writing new directives.

Field Summary

private SimpleNode
document
Root of the AST node structure that results from parsing a template.
private NodeViewMode
visitor
Visitor used to traverse the AST node structure and produce a visual representation of the node structure.

Constructor Summary

TemplateNodeView(String template)
Default constructor: sets up the Velocity Runtime, creates the visitor for traversing the node structure and then produces the visual representation by the visitation.

Method Summary

static void
main(args[] )
For testing

Field Details

document

private SimpleNode document
Root of the AST node structure that results from parsing a template.


visitor

private NodeViewMode visitor
Visitor used to traverse the AST node structure and produce a visual representation of the node structure. Very good for debugging and writing new directives.

Constructor Details

TemplateNodeView

public TemplateNodeView(String template)
Default constructor: sets up the Velocity Runtime, creates the visitor for traversing the node structure and then produces the visual representation by the visitation.

Method Details

main

public static void main(args[] )
For testing


Copyright B) 2002 Apache Software Foundation. All Rights Reserved.