public class ASTReference extends SimpleNode
| Modifier and Type | Field and Description |
|---|---|
private boolean |
computableReference |
private boolean |
escaped |
private java.lang.String |
escPrefix |
private static int |
FORMAL_REFERENCE |
private java.lang.String |
identifier |
private java.lang.String |
literal |
private java.lang.String |
morePrefix |
private static int |
NORMAL_REFERENCE |
private java.lang.String |
nullString |
private int |
numChildren |
private static int |
QUIET_REFERENCE |
private int |
referenceType |
private java.lang.String |
rootString |
private static int |
RUNT |
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
|
java.lang.Object |
execute(java.lang.Object o,
InternalContextAdapter context)
gets an Object that 'is' the value of the reference
|
private java.lang.String |
getRoot() |
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)
Accept the visitor.
|
java.lang.String |
literal()
Override of the SimpleNode method literal()
Returns the literal representation of the
node.
|
boolean |
render(InternalContextAdapter context,
java.io.Writer writer)
gets the value of the reference and outputs it to the
writer.
|
void |
setLiteral(java.lang.String literal)
Routine to allow the literal representation to be
externally overridden.
|
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, getColumn, getFirstToken, getInfo, getLastToken, getLine, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setFirstToken, setInfo, setInvalid, toStringprivate static final int NORMAL_REFERENCE
private static final int FORMAL_REFERENCE
private static final int QUIET_REFERENCE
private static final int RUNT
private int referenceType
private java.lang.String nullString
private java.lang.String rootString
private boolean escaped
private boolean computableReference
private java.lang.String escPrefix
private java.lang.String morePrefix
private java.lang.String identifier
private java.lang.String literal
private int numChildren
protected Info uberInfo
public ASTReference(int id)
public ASTReference(Parser p, int id)
public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
jjtAccept in interface NodejjtAccept in class SimpleNodepublic java.lang.Object init(InternalContextAdapter context, java.lang.Object data) throws java.lang.Exception
init in interface Nodeinit in class SimpleNodejava.lang.Exceptionpublic java.lang.String getRootString()
public java.lang.Object execute(java.lang.Object o,
InternalContextAdapter context)
throws MethodInvocationException
execute in interface Nodeexecute in class SimpleNodeo - unused Object parametercontext - context used to generate valueMethodInvocationExceptionpublic boolean render(InternalContextAdapter context, java.io.Writer writer) throws java.io.IOException, MethodInvocationException
render in interface Noderender in class SimpleNodecontext - context of data to use in getting valuewriter - writer to render tojava.io.IOExceptionMethodInvocationExceptionpublic boolean evaluate(InternalContextAdapter context) throws MethodInvocationException
evaluate in interface Nodeevaluate in class SimpleNodecontext - context to compute value withMethodInvocationExceptionpublic java.lang.Object value(InternalContextAdapter context) throws MethodInvocationException
value in interface Nodevalue in class SimpleNodeMethodInvocationExceptionpublic boolean setValue(InternalContextAdapter context, java.lang.Object value) throws MethodInvocationException
context - context object containing this referencevalue - Object to set as valueMethodInvocationExceptionASTSetDirectiveprivate java.lang.String getRoot()
public java.lang.Object getVariableValue(Context context, java.lang.String variable)
public void setLiteral(java.lang.String literal)
literal - String to render to when nullpublic java.lang.String literal()
literal in interface Nodeliteral in class SimpleNodeCopyright ? 2002 Apache Software Foundation. All Rights Reserved.