public class ASTReference extends SimpleNode
| 限定符和类型 | 字段和说明 |
|---|---|
boolean |
strictEscape
Indicates if we are using modified escape behavior in strict mode.
|
boolean |
strictRef
Indicates if we are running in strict reference mode.
|
boolean |
toStringNullCheck
Indicates if toString() should be called during condition evaluation just
to ensure it does not return null.
|
protected Info |
uberInfo |
| 构造器和说明 |
|---|
ASTReference(int id) |
ASTReference(Parser p,
int id) |
| 限定符和类型 | 方法和说明 |
|---|---|
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
|
java.lang.Object |
execute(java.lang.Object o,
InternalContextAdapter context)
gets an Object that 'is' the value of the reference
|
java.lang.String |
getDollarBang() |
java.lang.String |
getRootString()
Returns the 'root string', the reference key
|
java.lang.Object |
getVariableValue(Context context,
java.lang.String variable) |
java.lang.Object |
init(InternalContextAdapter context,
java.lang.Object data) |
java.lang.Object |
jjtAccept(ParserVisitor visitor,
java.lang.Object data) |
static java.lang.String |
printClass(java.lang.Class clazz)
Utility class to handle nulls when printing a class type
|
boolean |
render(InternalContextAdapter context,
java.io.Writer writer)
gets the value of the reference and outputs it to the
writer.
|
boolean |
setValue(InternalContextAdapter context,
java.lang.Object value)
Sets the value of a complex reference (something like $foo.bar)
Currently used by ASTSetReference()
|
java.lang.Object |
value(InternalContextAdapter context) |
childrenAccept, dump, getChildren, getColumn, getFirstToken, getInfo, getLastToken, getLine, getLocation, getRuntimeServices, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, setFirstToken, setInfo, setInvalid, toString, toStringpublic boolean strictRef
public boolean strictEscape
public boolean toStringNullCheck
protected Info uberInfo
public ASTReference(int id)
id - public ASTReference(Parser p, int id)
p - id - public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
jjtAccept 在接口中 NodejjtAccept 在类中 SimpleNodeSimpleNode.jjtAccept(bboss.org.apache.velocity.runtime.parser.node.ParserVisitor, java.lang.Object)public java.lang.Object init(InternalContextAdapter context, java.lang.Object data) throws TemplateInitException
init 在接口中 Nodeinit 在类中 SimpleNodeTemplateInitExceptionSimpleNode.init(bboss.org.apache.velocity.context.InternalContextAdapter, java.lang.Object)public java.lang.String getRootString()
public java.lang.Object execute(java.lang.Object o,
InternalContextAdapter context)
throws MethodInvocationException
execute 在接口中 Nodeexecute 在类中 SimpleNodeo - unused Object parametercontext - context used to generate valueMethodInvocationExceptionNode.execute(java.lang.Object, bboss.org.apache.velocity.context.InternalContextAdapter)public boolean render(InternalContextAdapter context, java.io.Writer writer) throws java.io.IOException, MethodInvocationException
render 在接口中 Noderender 在接口中 Renderablerender 在类中 SimpleNodecontext - context of data to use in getting valuewriter - writer to render tojava.io.IOExceptionMethodInvocationExceptionNode.render(bboss.org.apache.velocity.context.InternalContextAdapter, java.io.Writer)public boolean evaluate(InternalContextAdapter context) throws MethodInvocationException
evaluate 在接口中 Nodeevaluate 在类中 SimpleNodecontext - context to compute value withMethodInvocationExceptionNode.evaluate(bboss.org.apache.velocity.context.InternalContextAdapter)public java.lang.Object value(InternalContextAdapter context) throws MethodInvocationException
value 在接口中 Nodevalue 在类中 SimpleNodeMethodInvocationExceptionSimpleNode.value(bboss.org.apache.velocity.context.InternalContextAdapter)public static java.lang.String printClass(java.lang.Class clazz)
public boolean setValue(InternalContextAdapter context, java.lang.Object value) throws MethodInvocationException
context - context object containing this referencevalue - Object to set as valueMethodInvocationExceptionASTSetDirectivepublic java.lang.Object getVariableValue(Context context, java.lang.String variable) throws MethodInvocationException
context - variable - MethodInvocationExceptionpublic java.lang.String getDollarBang()