Class ASTElseStatement
java.lang.Object
org.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.ASTElseStatement
- All Implemented Interfaces:
Cloneable
,Node
,Renderable
This class is responsible for handling the Else VTL control statement.
Please look at the Parser.jjt file which is
what controls the generation of this class.
- Version:
- $Id$
- Author:
- Jason van Zyl, Geir Magnusson Jr.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluate
(InternalContextAdapter context) An ASTElseStatement always evaluates to true.init
(InternalContextAdapter context, Object data) jjtAccept
(StandardParserVisitor visitor, Object data) Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
childrenAccept, cleanupParserAndTokens, clone, clone, dump, dump, dump, execute, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getParser, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, render, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toString, value
-
Constructor Details
-
ASTElseStatement
public ASTElseStatement(int id) - Parameters:
id
-
-
ASTElseStatement
- Parameters:
p
-id
-
-
-
Method Details
-
jjtAccept
- Specified by:
jjtAccept
in interfaceNode
- Overrides:
jjtAccept
in classSimpleNode
- Parameters:
visitor
-data
-- Returns:
- The Node execution result object.
- See Also:
-
evaluate
An ASTElseStatement always evaluates to true. Basically behaves like an #if(true).- Specified by:
evaluate
in interfaceNode
- Overrides:
evaluate
in classSimpleNode
- Parameters:
context
-- Returns:
- Always true.
- See Also:
-
init
- Specified by:
init
in interfaceNode
- Overrides:
init
in classSimpleNode
- Parameters:
context
-data
-- Returns:
- The init result.
- Throws:
TemplateInitException
- See Also:
-