public class ASTIndex extends SimpleNode
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
methodName |
private static java.lang.Object[] |
noParams |
private static java.lang.Class<?>[] |
noTypes |
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 java.lang.Object |
adjMinusIndexArg(java.lang.Object argument,
java.lang.Object o,
InternalContextAdapter context,
SimpleNode node)
If argument is an Integer and negative, then return (o.size() - argument).
|
java.lang.Object |
execute(java.lang.Object o,
InternalContextAdapter context) |
java.lang.Object |
init(InternalContextAdapter context,
java.lang.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
private static final java.lang.String methodName
protected boolean strictRef
private static final java.lang.Object[] noParams
private static final java.lang.Class<?>[] noTypes
public ASTIndex(int i)
i
- public ASTIndex(Parser p, int i)
p
- i
- public java.lang.Object init(InternalContextAdapter context, java.lang.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 java.lang.Object adjMinusIndexArg(java.lang.Object argument, java.lang.Object o, InternalContextAdapter context, SimpleNode node)
argument
- o
- context
- Used to access the method cache.node
- ASTNode used for error reporting.public java.lang.Object execute(java.lang.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)