public class SchematicFieldReference extends FieldReference implements MemberReference, ReferenceSuffix, TypeReferenceContainer, ExpressionContainer
Modifier and Type | Field and Description |
---|---|
protected SchemaVariable |
schemaVariable
Reference suffix
|
prefix
variable
Constructor and Description |
---|
SchematicFieldReference(ExtList children,
ReferencePrefix prefix) |
SchematicFieldReference(SchemaVariable pe,
ReferencePrefix prefix) |
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)
Return the expression at the specified index in this node's
"virtual" expression array.
|
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.
|
ProgramElementName |
getProgramElementName()
Get identifier.
|
ReferencePrefix |
getReferencePrefix()
Get reference prefix.
|
ReferenceSuffix |
getReferenceSuffix()
Get reference prefix.
|
TypeReference |
getTypeReferenceAt(int index)
Return the type reference at the specified index in this node's
"virtual" type reference array.
|
int |
getTypeReferenceCount()
Get the number of type references in this container.
|
MatchConditions |
match(SourceData source,
MatchConditions matchCond)
matches the source "text" (@link SourceData#getSource()) against the pattern represented
by this object.
|
void |
prettyPrint(PrettyPrinter p)
pretty print
|
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
|
isSingleDeref, referencesOwnInstanceField
getIdentifier, getKeYJavaType, getKeYJavaType, getKeYJavaType, getName, getProgramVariable
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments
equalsModRenaming, getEndPosition, getLastElement, getPositionInfo, getRelativePosition, getStartPosition
protected final SchemaVariable schemaVariable
public SchematicFieldReference(SchemaVariable pe, ReferencePrefix prefix)
public SchematicFieldReference(ExtList children, ReferencePrefix prefix)
public int getChildCount()
getChildCount
in interface NonTerminalProgramElement
getChildCount
in class FieldReference
public ProgramElement getChildAt(int index)
getChildAt
in interface NonTerminalProgramElement
getChildAt
in class FieldReference
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 FieldReference
public ReferenceSuffix getReferenceSuffix()
public ReferencePrefix setReferencePrefix(ReferencePrefix rp)
setReferencePrefix
in class FieldReference
public int getTypeReferenceCount()
getTypeReferenceCount
in interface TypeReferenceContainer
getTypeReferenceCount
in class FieldReference
public TypeReference getTypeReferenceAt(int index)
getTypeReferenceAt
in interface TypeReferenceContainer
getTypeReferenceAt
in class FieldReference
index
- an index for a type reference.java.lang.ArrayIndexOutOfBoundsException
- if index is out
of bounds.public int getExpressionCount()
getExpressionCount
in interface ExpressionContainer
getExpressionCount
in class FieldReference
public Expression getExpressionAt(int index)
getExpressionAt
in interface ExpressionContainer
getExpressionAt
in class FieldReference
index
- an index for an expression.java.lang.ArrayIndexOutOfBoundsException
- if index is out
of bounds.public SourceElement getFirstElement()
JavaSourceElement
getFirstElement
in interface SourceElement
getFirstElement
in class FieldReference
JavaSourceElement.toSource()
,
JavaSourceElement.getStartPosition()
public SourceElement getFirstElementIncludingBlocks()
SourceElement
getFirstElementIncludingBlocks
in interface SourceElement
getFirstElementIncludingBlocks
in class FieldReference
SourceElement.getStartPosition()
public ProgramElementName getProgramElementName()
NamedProgramElement
getProgramElementName
in interface NamedProgramElement
getProgramElementName
in class VariableReference
public void prettyPrint(PrettyPrinter p) throws java.io.IOException
prettyPrint
in interface SourceElement
prettyPrint
in class FieldReference
p
- a pretty printer.java.io.IOException
- occasionally thrown.public void visit(Visitor v)
visit
in interface SourceElement
visit
in class FieldReference
v
- the Visitorpublic MatchConditions match(SourceData source, MatchConditions matchCond)
ProgramElement
MatchConditions
with
the found instantiations of the schemavariables. If the match
failed, null is returned instead.match
in interface ProgramElement
match
in class JavaNonTerminalProgramElement
source
- the SourceData with the program element to matchmatchCond
- the MatchConditions found up to this point