public class ASTIndex extends SimpleNode
Modifier and Type | Field and Description |
---|---|
protected boolean |
strictRef
Indicates if we are running in strict reference mode.
|
Constructor and Description |
---|
ASTIndex(int i) |
ASTIndex(Parser p,
int i) |
Modifier and Type | Method and Description |
---|---|
static Object |
adjMinusIndexArg(Object argument,
Object o,
InternalContextAdapter context,
SimpleNode node)
If argument is an Integer and negative, then return (o.size() - argument).
|
Object |
execute(Object o,
InternalContextAdapter context) |
Object |
init(InternalContextAdapter context,
Object data) |
childrenAccept, cleanupParserAndTokens, dump, evaluate, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, render, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toString, value
protected boolean strictRef
public ASTIndex(int i)
public ASTIndex(Parser p, int i)
public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
init
in interface Node
init
in class SimpleNode
TemplateInitException
Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
public static Object adjMinusIndexArg(Object argument, Object o, InternalContextAdapter context, SimpleNode node)
context
- Used to access the method cache.node
- ASTNode used for error reporting.public Object execute(Object o, InternalContextAdapter context) throws MethodInvocationException
execute
in interface Node
execute
in class SimpleNode
MethodInvocationException
Node.execute(java.lang.Object, org.apache.velocity.context.InternalContextAdapter)
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.