public final class Identifier extends ASTSourceBase
Modifier and Type | Method and Description |
---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
void |
accept(ASTVisitorOld visitor)
Accept visitor for a visit.
|
static Identifier |
construct(java.lang.String name)
Construct identifier.
|
static Identifier[] |
construct(java.lang.String[] names)
Construct identifiers.
|
static Identifier |
constructNew(java.lang.String name,
java.util.Collection<java.lang.String> used)
Create a new identifier.
|
java.lang.String |
getString()
Get string representation of identifier.
|
Symbol |
getSymbol()
Get symbol denoted by identifier.
|
void |
setPosition(SourcePosition position)
Set the position of this identifier in the source code.
|
void |
setSymbol(Symbol symbol)
Set symbol denoted by identifier (must not yet be set).
|
getPosition
accept, accept, acceptChildren, print, printCore, toString, toStringCore
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptChildren, print, printCore, toString, toStringCore
public static Identifier construct(java.lang.String name)
name
- the textual representation of the identifier.public static Identifier[] construct(java.lang.String[] names)
names
- the textual representations of the identifiers.public static Identifier constructNew(java.lang.String name, java.util.Collection<java.lang.String> used)
name
- the (non-empty) base name of the new identifier
(must start with a non-digit character)used
- a collection of names that must not be used.public java.lang.String getString()
public void accept(ASTVisitorOld visitor)
accept
in interface AST
accept
in class ASTSourceBase
visitor
- the visitor who is accepted by this node.public void accept(ASTVisitor visitor)
accept
in interface AST
accept
in class ASTSourceBase
visitor
- the visitor who is accepted by this node.public void setPosition(SourcePosition position)
setPosition
in interface ASTSource
setPosition
in class ASTSourceBase
position
- the source code position.public void setSymbol(Symbol symbol)
symbol
- the symbol.public Symbol getSymbol()