org.apache.velocity.runtime.parser.node

Class ASTElseIfStatement

public class ASTElseIfStatement extends SimpleNode

This class is responsible for handling the ElseIf VTL control statement. Please look at the Parser.jjt file which is what controls the generation of this class.

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

Author: Jason van Zyl Geir Magnusson Jr.

Constructor Summary
ASTElseIfStatement(int id)
ASTElseIfStatement(Parser p, int id)
Method Summary
booleanevaluate(InternalContextAdapter context)
An ASTElseStatement is true if the expression it contains evaluates to true.
ObjectjjtAccept(ParserVisitor visitor, Object data)
Accept the visitor.
booleanrender(InternalContextAdapter context, Writer writer)
renders the block

Constructor Detail

ASTElseIfStatement

public ASTElseIfStatement(int id)

ASTElseIfStatement

public ASTElseIfStatement(Parser p, int id)

Method Detail

evaluate

public boolean evaluate(InternalContextAdapter context)
An ASTElseStatement is true if the expression it contains evaluates to true. Expressions know how to evaluate themselves, so we do that here and return the value back to ASTIfStatement where this node was originally asked to evaluate itself.

jjtAccept

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

render

public boolean render(InternalContextAdapter context, Writer writer)
renders the block
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.