public class VariableReference extends JavaNonTerminalProgramElement implements NameReference, Expression, ReferencePrefix
Modifier and Type | Field and Description |
---|---|
protected ProgramVariable |
variable |
Modifier | Constructor and Description |
---|---|
protected |
VariableReference() |
|
VariableReference(ExtList children) |
|
VariableReference(ProgramVariable variable) |
|
VariableReference(ProgramVariable variable,
PositionInfo pi) |
Modifier and Type | Method and Description |
---|---|
ProgramElement |
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
child array
|
int |
getChildCount()
Returns the number of children of this node.
|
SourceElement |
getFirstElement()
Finds the source element that occurs first in the source.
|
ProgramElementName |
getIdentifier() |
KeYJavaType |
getKeYJavaType() |
KeYJavaType |
getKeYJavaType(Services javaServ) |
KeYJavaType |
getKeYJavaType(Services javaServ,
ExecutionContext ec)
returns the
KeYJavaType of an expression |
java.lang.String |
getName()
Return the name of the model element.
|
ProgramElementName |
getProgramElementName()
Get identifier.
|
ProgramVariable |
getProgramVariable() |
ReferencePrefix |
getReferencePrefix()
We do not have a prefix, so fake it!
|
void |
prettyPrint(PrettyPrinter p)
Pretty printing the source element.
|
ReferencePrefix |
setReferencePrefix(ReferencePrefix r) |
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getFirstElementIncludingBlocks, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments, match
equalsModRenaming, getEndPosition, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPosition
protected final ProgramVariable variable
protected VariableReference()
public VariableReference(ExtList children)
public VariableReference(ProgramVariable variable, PositionInfo pi)
public VariableReference(ProgramVariable variable)
public ProgramElementName getProgramElementName()
NamedProgramElement
getProgramElementName
in interface NamedProgramElement
public int getChildCount()
NonTerminalProgramElement
getChildCount
in interface NonTerminalProgramElement
public ProgramElement getChildAt(int index)
getChildAt
in interface NonTerminalProgramElement
index
- an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException
- if index is out
of boundspublic ProgramElementName getIdentifier()
public final java.lang.String getName()
NamedModelElement
getName
in interface NamedModelElement
public ProgramVariable getProgramVariable()
public SourceElement getFirstElement()
JavaSourceElement
getFirstElement
in interface SourceElement
getFirstElement
in class JavaSourceElement
JavaSourceElement.toSource()
,
JavaSourceElement.getStartPosition()
public void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElement
prettyPrint
in interface SourceElement
prettyPrint
in class JavaProgramElement
p
- a pretty printer.java.io.IOException
- occasionally thrown.public void visit(Visitor v)
visit
in interface SourceElement
v
- the Visitorpublic ReferencePrefix getReferencePrefix()
getReferencePrefix
in interface ReferencePrefix
public ReferencePrefix setReferencePrefix(ReferencePrefix r)
public KeYJavaType getKeYJavaType(Services javaServ, ExecutionContext ec)
Expression
KeYJavaType
of an expressiongetKeYJavaType
in interface Expression
public KeYJavaType getKeYJavaType(Services javaServ)
public KeYJavaType getKeYJavaType()