public class FieldReference extends VariableReference implements MemberReference, ReferenceSuffix, TypeReferenceContainer, ExpressionContainer
Modifier and Type | Field and Description |
---|---|
protected ReferencePrefix |
prefix
Reference prefix.
|
variable
Modifier | Constructor and Description |
---|---|
protected |
FieldReference() |
|
FieldReference(ExtList children,
ReferencePrefix prefix) |
|
FieldReference(ProgramVariable pv,
ReferencePrefix prefix) |
|
FieldReference(ProgramVariable pv,
ReferencePrefix prefix,
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.
|
Expression |
getExpressionAt(int index) |
int |
getExpressionCount()
Get the number of expressions in this container.
|
SourceElement |
getFirstElement()
Finds the source element that occurs first in the source.
|
SourceElement |
getFirstElementIncludingBlocks()
Finds the source element that occurs first in the source.
|
ReferencePrefix |
getReferencePrefix()
Get reference prefix.
|
TypeReference |
getTypeReferenceAt(int index) |
int |
getTypeReferenceCount()
Get the number of type references in this container.
|
private void |
initPrefix(ProgramVariable pv,
ReferencePrefix prefix) |
boolean |
isSingleDeref()
are there "dots" in the prefix?
|
void |
prettyPrint(PrettyPrinter p)
pretty print
|
boolean |
referencesOwnInstanceField() |
ReferencePrefix |
setReferencePrefix(ReferencePrefix rp)
Set reference prefix.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
getIdentifier, getKeYJavaType, getKeYJavaType, getKeYJavaType, getName, getProgramElementName, getProgramVariable
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments, match
equalsModRenaming, getEndPosition, getLastElement, getPositionInfo, getRelativePosition, getStartPosition
protected ReferencePrefix prefix
protected FieldReference()
public FieldReference(ProgramVariable pv, ReferencePrefix prefix)
public FieldReference(ExtList children, ReferencePrefix prefix)
public FieldReference(ProgramVariable pv, ReferencePrefix prefix, PositionInfo pi)
private void initPrefix(ProgramVariable pv, ReferencePrefix prefix)
public int getChildCount()
getChildCount
in interface NonTerminalProgramElement
getChildCount
in class VariableReference
public ProgramElement getChildAt(int index)
getChildAt
in interface NonTerminalProgramElement
getChildAt
in class VariableReference
index
- an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException
- if index is out
of boundspublic ReferencePrefix getReferencePrefix()
getReferencePrefix
in interface ReferencePrefix
getReferencePrefix
in class VariableReference
public boolean referencesOwnInstanceField()
public ReferencePrefix setReferencePrefix(ReferencePrefix rp)
setReferencePrefix
in class VariableReference
public int getTypeReferenceCount()
getTypeReferenceCount
in interface TypeReferenceContainer
public TypeReference getTypeReferenceAt(int index)
getTypeReferenceAt
in interface TypeReferenceContainer
public int getExpressionCount()
getExpressionCount
in interface ExpressionContainer
public Expression getExpressionAt(int index)
getExpressionAt
in interface ExpressionContainer
public SourceElement getFirstElement()
JavaSourceElement
getFirstElement
in interface SourceElement
getFirstElement
in class VariableReference
JavaSourceElement.toSource()
,
JavaSourceElement.getStartPosition()
public SourceElement getFirstElementIncludingBlocks()
SourceElement
getFirstElementIncludingBlocks
in interface SourceElement
getFirstElementIncludingBlocks
in class JavaSourceElement
SourceElement.getStartPosition()
public void prettyPrint(PrettyPrinter p) throws java.io.IOException
prettyPrint
in interface SourceElement
prettyPrint
in class VariableReference
p
- a pretty printer.java.io.IOException
- occasionally thrown.public void visit(Visitor v)
visit
in interface SourceElement
visit
in class VariableReference
v
- the Visitorpublic boolean isSingleDeref()