Class ASTIntegerRange
- java.lang.Object
-
- org.apache.velocity.runtime.parser.node.SimpleNode
-
- org.apache.velocity.runtime.parser.node.ASTIntegerRange
-
- All Implemented Interfaces:
Cloneable,Node,Renderable
public class ASTIntegerRange extends SimpleNode
handles the range 'operator' [ n .. m ] Please look at the Parser.jjt file which is what controls the generation of this class.- Author:
- Geir Magnusson Jr.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classASTIntegerRange.IntegerRange
-
Constructor Summary
Constructors Constructor Description ASTIntegerRange(int id)ASTIntegerRange(Parser p, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectinit(InternalContextAdapter context, Object data)ObjectjjtAccept(StandardParserVisitor visitor, Object data)Objectvalue(InternalContextAdapter context)does the real work.-
Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
childrenAccept, cleanupParserAndTokens, clone, clone, dump, dump, dump, evaluate, 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
-
-
-
-
Constructor Detail
-
ASTIntegerRange
public ASTIntegerRange(int id)
- Parameters:
id-
-
ASTIntegerRange
public ASTIntegerRange(Parser p, int id)
- Parameters:
p-id-
-
-
Method Detail
-
jjtAccept
public Object jjtAccept(StandardParserVisitor visitor, Object data)
- Specified by:
jjtAcceptin interfaceNode- Overrides:
jjtAcceptin classSimpleNode- Returns:
- The Node execution result object.
- See Also:
SimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.StandardParserVisitor, java.lang.Object)
-
value
public Object value(InternalContextAdapter context) throws MethodInvocationException
does the real work. Creates an Vector of Integers with the right value range- Specified by:
valuein interfaceNode- Overrides:
valuein classSimpleNode- Parameters:
context- app context used if Left or Right of .. is a ref- Returns:
- Object array of Integers
- Throws:
MethodInvocationException- See Also:
Node.value(org.apache.velocity.context.InternalContextAdapter)
-
init
public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
- Specified by:
initin interfaceNode- Overrides:
initin classSimpleNode- Returns:
- The init result.
- Throws:
TemplateInitException- See Also:
Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
-
-