public final class Reference extends Identifier implements Type, Expression
| Constructor and Description |
|---|
Reference(java.lang.String name)
construct reference from name (symbol is set to null)
|
Reference(java.lang.String name,
Symbol symbol)
construct reference from name and symbol
|
| Modifier and Type | Method and Description |
|---|---|
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
int |
getPriority()
get binding level for printing (lower numbers mean greater binding power)
|
Symbol |
getSymbol()
returns symbol associated to reference
|
Expression |
instantiate()
return copy of AST with value references instantiated by the substitutions
set in the corresponding declaration identifiers
|
Type |
instantiateType()
return copy of AST with value references instantiated by the substitutions
set in the corresponding declaration identifiers
|
void |
print(java.io.PrintWriter out)
Prints text representation on out (without new line termination).
|
void |
printCore(java.io.PrintWriter out)
Prints text representation on out (without new line termination).
|
void |
setSymbol(Symbol symbol)
sets symbol associated to reference
|
getName, printPriority, setNameprintParens, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitprintPriorityprintParens, toStringpublic Reference(java.lang.String name)
name - the text representation of the referencepublic Reference(java.lang.String name,
Symbol symbol)
name - the text representation of the referencesymbol - the symbol associated to the referencepublic Symbol getSymbol()
public void setSymbol(Symbol symbol)
symbol - the symbolpublic int getPriority()
getPriority in interface Expressionpublic Expression instantiate()
instantiate in interface Expressionpublic Type instantiateType()
instantiateType in interface Typepublic void printCore(java.io.PrintWriter out)
printCore in interface ASTprintCore in class Identifierout - the stream on which the text is writtenpublic void print(java.io.PrintWriter out)
print in interface ASTprint in class Identifierout - the stream on which the text is writtenpublic AST accept(ASTVisitor visitor)