Jason van Zyl, Geir Magnusson Jr., Christoph Reck,
Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode |
childrenAccept, dump, getColumn, getFirstToken, getInfo, getLastToken, getLine, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, setFirstToken, setInfo, setInvalid, toString, toString |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
NORMAL_REFERENCE
private static final int NORMAL_REFERENCE
FORMAL_REFERENCE
private static final int FORMAL_REFERENCE
QUIET_REFERENCE
private static final int QUIET_REFERENCE
referenceType
private int referenceType
nullString
private java.lang.String nullString
rootString
private java.lang.String rootString
escaped
private boolean escaped
computableReference
private boolean computableReference
prefix
private java.lang.String prefix
firstTokenPrefix
private java.lang.String firstTokenPrefix
identifier
private java.lang.String identifier
numChildren
private int numChildren
ASTReference
public ASTReference(int id)
ASTReference
public ASTReference(Parser p,
int id)
jjtAccept
public java.lang.Object jjtAccept(ParserVisitor visitor,
java.lang.Object data)
- Accept the visitor.
- Overrides:
jjtAccept
in class SimpleNode
init
public java.lang.Object init(InternalContextAdapter context,
java.lang.Object data)
throws java.lang.Exception
- Overrides:
init
in class SimpleNode
execute
public java.lang.Object execute(java.lang.Object o,
InternalContextAdapter context)
throws MethodInvocationException
- gets an Object that 'is' the value of the reference
- Overrides:
execute
in class SimpleNode
- Parameters:
o
- unused Object parametercontext
- context used to generate value
render
public boolean render(InternalContextAdapter context,
java.io.Writer writer)
throws java.io.IOException,
MethodInvocationException
- gets the value of the reference and outputs it to the
writer.
- Overrides:
render
in class SimpleNode
- Parameters:
context
- context of data to use in getting valuewriter
- writer to render to
evaluate
public boolean evaluate(InternalContextAdapter context)
throws MethodInvocationException
- Computes boolean value of this reference
Returns the actual value of reference return type
boolean, and 'true' if value is not null
- Overrides:
evaluate
in class SimpleNode
- Parameters:
context
- context to compute value with
value
public java.lang.Object value(InternalContextAdapter context)
throws MethodInvocationException
- Overrides:
value
in class SimpleNode
setValue
public boolean setValue(InternalContextAdapter context,
java.lang.Object value)
throws MethodInvocationException
- Sets the value of a complex reference (something like $foo.bar)
Currently used by ASTSetReference()
- Parameters:
context
- context object containing this referencevalue
- Object to set as value- Returns:
- true if successful, false otherwise
- See Also:
ASTSetDirective
getRoot
private java.lang.String getRoot()
getVariableValue
public java.lang.Object getVariableValue(Context context,
java.lang.String variable)
Copyright © 2001 Apache Software Foundation. All Rights Reserved.