public class ASTReference extends SimpleNode
| Modifier and Type | Field and Description |
|---|---|
boolean |
strictEscape
Indicates if we are using modified escape behavior in strict mode.
|
boolean |
strictRef
Indicates if we are running in strict reference mode.
|
protected Info |
uberInfo |
| Constructor and Description |
|---|
ASTReference(int id) |
ASTReference(Parser p,
int id) |
| Modifier and Type | Method and Description |
|---|---|
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 |
getRootVariableValue(InternalContextAdapter context) |
Object |
init(InternalContextAdapter context,
Object data) |
Object |
jjtAccept(ParserVisitor visitor,
Object data) |
static String |
printClass(Class clazz)
Utility class to handle nulls when printing a class type
|
boolean |
render(InternalContextAdapter context,
Writer writer)
gets the value of the reference and outputs it to the
writer.
|
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) |
childrenAccept, cleanupParserAndTokens, dump, dump, dump, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getParser, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toStringpublic boolean strictRef
public boolean strictEscape
protected Info uberInfo
public ASTReference(int id)
id - public ASTReference(Parser p, int id)
p - id - public Object jjtAccept(ParserVisitor visitor, Object data)
jjtAccept in interface NodejjtAccept in class SimpleNodeSimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.ParserVisitor, java.lang.Object)public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
init in interface Nodeinit in class SimpleNodeTemplateInitExceptionSimpleNode.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)public String getRootString()
public Object execute(Object o, InternalContextAdapter context) throws MethodInvocationException
execute in interface Nodeexecute in class SimpleNodeo - Object parameter, unused per se, but non-null by convention inside an #if/#elseif evaluationcontext - context used to generate valueMethodInvocationExceptionNode.execute(java.lang.Object, org.apache.velocity.context.InternalContextAdapter)public boolean render(InternalContextAdapter context, Writer writer) throws IOException, MethodInvocationException
render in interface Noderender in interface Renderablerender in class SimpleNodecontext - context of data to use in getting valuewriter - writer to render toIOExceptionMethodInvocationExceptionNode.render(org.apache.velocity.context.InternalContextAdapter, java.io.Writer)public boolean evaluate(InternalContextAdapter context) throws MethodInvocationException
evaluate in interface Nodeevaluate in class SimpleNodecontext - context to compute value withMethodInvocationExceptionNode.evaluate(org.apache.velocity.context.InternalContextAdapter)public Object value(InternalContextAdapter context) throws MethodInvocationException
value in interface Nodevalue in class SimpleNodeMethodInvocationExceptionSimpleNode.value(org.apache.velocity.context.InternalContextAdapter)public static String printClass(Class clazz)
clazz - public boolean setValue(InternalContextAdapter context, Object value) throws MethodInvocationException
context - context object containing this referencevalue - Object to set as valueMethodInvocationExceptionASTSetDirectivepublic Object getRootVariableValue(InternalContextAdapter context)
context - MethodInvocationExceptionCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.