|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.ASTReference
public class ASTReference
This class is responsible for handling the references in VTL ($foo). Please look at the Parser.jjt file which is what controls the generation of this class.
| Field Summary | |
|---|---|
protected Info |
uberInfo
|
| Fields inherited from class org.apache.velocity.runtime.parser.node.SimpleNode |
|---|
children, first, id, info, invalid, last, parent, parser, rsvc, state |
| Constructor Summary | |
|---|---|
ASTReference(int id)
|
|
ASTReference(Parser p,
int id)
|
|
| Method Summary | |
|---|---|
boolean |
evaluate(InternalContextAdapter context)
Computes boolean value of this reference Returns the actual value of reference return type boolean, and 'true' if value is not null |
Object |
execute(Object o,
InternalContextAdapter context)
gets an Object that 'is' the value of the reference |
String |
getRootString()
Returns the 'root string', the reference key |
Object |
getVariableValue(Context context,
String variable)
|
Object |
init(InternalContextAdapter context,
Object data)
|
Object |
jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor. |
String |
literal()
Override of the SimpleNode method literal() Returns the literal representation of the node. |
boolean |
render(InternalContextAdapter context,
Writer writer)
gets the value of the reference and outputs it to the writer. |
void |
setLiteral(String literal)
Routine to allow the literal representation to be externally overridden. |
boolean |
setValue(InternalContextAdapter context,
Object value)
Sets the value of a complex reference (something like $foo.bar) Currently used by ASTSetReference() |
Object |
value(InternalContextAdapter context)
|
| Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode |
|---|
childrenAccept, dump, getColumn, getFirstToken, getInfo, getLastToken, getLine, getLocation, getLocation, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setFirstToken, setInfo, setInvalid, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Info uberInfo
| Constructor Detail |
|---|
public ASTReference(int id)
public ASTReference(Parser p,
int id)
| Method Detail |
|---|
public Object jjtAccept(ParserVisitor visitor,
Object data)
jjtAccept in interface NodejjtAccept in class SimpleNode
public Object init(InternalContextAdapter context,
Object data)
throws Exception
init in interface Nodeinit in class SimpleNodeExceptionpublic String getRootString()
public Object execute(Object o,
InternalContextAdapter context)
throws MethodInvocationException
execute in interface Nodeexecute in class SimpleNodeo - unused Object parametercontext - context used to generate value
MethodInvocationException
public boolean render(InternalContextAdapter context,
Writer writer)
throws IOException,
MethodInvocationException
render in interface Noderender in class SimpleNodecontext - context of data to use in getting valuewriter - writer to render to
IOException
MethodInvocationException
public boolean evaluate(InternalContextAdapter context)
throws MethodInvocationException
evaluate in interface Nodeevaluate in class SimpleNodecontext - context to compute value with
MethodInvocationException
public Object value(InternalContextAdapter context)
throws MethodInvocationException
value in interface Nodevalue in class SimpleNodeMethodInvocationException
public boolean setValue(InternalContextAdapter context,
Object value)
throws MethodInvocationException
context - context object containing this referencevalue - Object to set as value
MethodInvocationExceptionASTSetDirective
public Object getVariableValue(Context context,
String variable)
public void setLiteral(String literal)
literal - String to render to when nullpublic String literal()
literal in interface Nodeliteral in class SimpleNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||