public class Identifier extends IDExpression
SymbolTools.getOrphanID(String).
However, the correctness of any analysis/transformation after introducing such
"orphan" identifier is not guaranteed.| Constructor and Description |
|---|
Identifier(Symbol symbol)
Constructs and returns a new Identifier with the given
Symbol object.
|
| Modifier and Type | Method and Description |
|---|---|
Identifier |
clone()
Returns a clone of this identifier.
|
static void |
defaultPrint(Identifier i,
java.io.PrintWriter o)
Prints an identifier to a stream.
|
boolean |
equals(java.lang.Object o)
Checks if the given object o is equal to this identifier.
|
java.lang.String |
getName()
Returns the string name of this identifier.
|
Symbol |
getSymbol()
Returns the
Symbol object linked with this identifier. |
int |
hashCode()
Returns the hashcode of this identifier
|
java.lang.String |
toString()
Returns a string representation of this identifier (=
getName()). |
findDeclaration, setGlobal, setTypenamecompareTo, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verifypublic Identifier(Symbol symbol)
symbol - the relevant symbol object, which is typically a varaible
declarator.public Identifier clone()
clone in class IDExpressionpublic static void defaultPrint(Identifier i, java.io.PrintWriter o)
i - The identifier to print.o - The writer on which to print the identifier.public java.lang.String toString()
getName()).toString in class Expressionpublic boolean equals(java.lang.Object o)
equals in class Expressiono - the object to be compared with.public int hashCode()
hashCode in class Expressionpublic java.lang.String getName()
getName in class IDExpression