public final class ReferenceLookup extends ExpressionStatement<ReferenceLookup>
This expression represents every reference use, that is when a variable is considered as an expression.
| Modifier and Type | Method and Description | 
|---|---|
void | 
accept(GoloIrVisitor visitor)
Accept the visitor. 
 | 
java.lang.String | 
getName()  | 
LocalReference | 
letRef()
Creates a corresponding local reference. 
 | 
static ReferenceLookup | 
of(java.lang.Object name)
Creates a lookup to the reference defined by the given name. 
 | 
protected void | 
replaceElement(GoloElement<?> original,
              GoloElement<?> newElement)
Replace a child. 
 | 
LocalReference | 
resolveIn(ReferenceTable referenceTable)
Resolves the reference in the given reference table. 
 | 
protected ReferenceLookup | 
self()  | 
java.lang.String | 
toString() | 
LocalReference | 
varRef()
Creates a corresponding local reference. 
 | 
call, clearDeclarations, declarations, hasLocalDeclarations, withancestor, ancestor, ancestorOfType, cantConvert, cantReplace, cantReplace, children, children, children, descendants, descendants, descendants, documentation, documentation, doesNotContain, enclosingModule, getLocalReferenceTable, hasParent, hasPosition, inheritedMetadata, makeParentOf, metadata, metadata, next, next, next, ofAST, parent, positionInSourceCode, positionInSourceCode, previous, previous, previous, replaceInParentBy, walkpublic static ReferenceLookup of(java.lang.Object name)
protected ReferenceLookup self()
self in class GoloElement<ReferenceLookup>public java.lang.String getName()
public LocalReference resolveIn(ReferenceTable referenceTable)
referenceTable - the reference table in which to resolve the lookup.null if the reference does not exists in the table.public LocalReference varRef()
The created local reference is a variable one, with the same name as this lookup.
public LocalReference letRef()
The created local reference is an immutable one, with the same name as this lookup.
public java.lang.String toString()
toString in class java.lang.Objectpublic void accept(GoloIrVisitor visitor)
 This method should only call the visitor visitXXXX method.
 The children of this node will be visited by the
 GoloElement.walk(GoloIrVisitor) method.
accept in class GoloElement<ReferenceLookup>protected void replaceElement(GoloElement<?> original, GoloElement<?> newElement)
 Replace original with newElement if original is a child of this node
 and type matches.
replaceElement in class GoloElement<ReferenceLookup>original - the original value to replace. Must be a child of this nodenewElement - the element to replace with. Type must match.GoloElement.cantReplace(), 
GoloElement.cantReplace(GoloElement, GoloElement), 
GoloElement.doesNotContain(GoloElement), 
GoloElement.cantConvert(String, Object)