Class ASTAddNode
java.lang.Object
org.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.ASTMathNode
org.apache.velocity.runtime.parser.node.ASTAddNode
- All Implemented Interfaces:
Node
,Renderable
Handles number addition of nodes.
Please look at the Parser.jjt file which is what controls the generation of this class.
Please look at the Parser.jjt file which is what controls the generation of this class.
- Version:
- $Id: ASTAddNode.java 712887 2008-11-11 00:27:50Z nbubna $
-
Field Summary
Fields inherited from class org.apache.velocity.runtime.parser.node.ASTMathNode
strictMode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
handleSpecial
(Object left, Object right, InternalContextAdapter context) Extension hook to allow special behavior by subclasses If this method returns a non-null value, that is returned, rather than the result of the math operation.perform
(Number left, Number right, InternalContextAdapter context) Performs the math operation represented by this node.Methods inherited from class org.apache.velocity.runtime.parser.node.ASTMathNode
init, jjtAccept, value
Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
childrenAccept, dump, evaluate, execute, getColumn, getFirstToken, getInfo, getLastToken, getLine, getLocation, getRuntimeServices, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, render, setFirstToken, setInfo, setInvalid, toString, toString
-
Constructor Details
-
ASTAddNode
public ASTAddNode(int id) - Parameters:
id
-
-
ASTAddNode
- Parameters:
p
-id
-
-
-
Method Details
-
handleSpecial
Description copied from class:ASTMathNode
Extension hook to allow special behavior by subclasses If this method returns a non-null value, that is returned, rather than the result of the math operation.- Overrides:
handleSpecial
in classASTMathNode
- See Also:
-
perform
Description copied from class:ASTMathNode
Performs the math operation represented by this node.- Specified by:
perform
in classASTMathNode
-