org.apache.velocity.runtime.parser.node

Class ASTDirective

public class ASTDirective extends SimpleNode

This class is responsible for handling the pluggable directives in VTL. ex. #foreach() Please look at the Parser.jjt file which is what controls the generation of this class.

Version: $Id: ASTDirective.java,v 1.21.4.1 2004/03/03 23:22:58 geirm Exp $

Author: Jason van Zyl Geir Magnusson Jr. Kasper Nielsen

Field Summary
Directivedirective
StringdirectiveName
booleanisDirective
Constructor Summary
ASTDirective(int id)
ASTDirective(Parser p, int id)
Method Summary
StringgetDirectiveName()
Gets the name of this directive.
Objectinit(InternalContextAdapter context, Object data)
ObjectjjtAccept(ParserVisitor visitor, Object data)
Accept the visitor.
booleanrender(InternalContextAdapter context, Writer writer)
voidsetDirectiveName(String str)
Sets the directive name.

Field Detail

directive

private Directive directive

directiveName

private String directiveName

isDirective

private boolean isDirective

Constructor Detail

ASTDirective

public ASTDirective(int id)

ASTDirective

public ASTDirective(Parser p, int id)

Method Detail

getDirectiveName

public String getDirectiveName()
Gets the name of this directive.

init

public Object init(InternalContextAdapter context, Object data)

jjtAccept

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

render

public boolean render(InternalContextAdapter context, Writer writer)

setDirectiveName

public void setDirectiveName(String str)
Sets the directive name. Used by the parser. This keeps us from having to dig it out of the token stream and gives the parse the change to override.
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.