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, dump, dump, evaluate, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getParser, 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)
i
- public ASTIndex(Parser p, int i)
p
- i
- public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
init
in interface Node
init
in class SimpleNode
context
- data
- TemplateInitException
Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
public static Object adjMinusIndexArg(Object argument, Object o, InternalContextAdapter context, SimpleNode node)
argument
- o
- 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
o
- context
- MethodInvocationException
Node.execute(java.lang.Object, org.apache.velocity.context.InternalContextAdapter)
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.