public class ArrayReference extends JavaNonTerminalProgramElement implements Reference, Expression, ReferencePrefix, ReferenceSuffix, ExpressionContainer, TypeReferenceContainer
| Modifier and Type | Field and Description | 
|---|---|
protected ImmutableArray<Expression> | 
inits
Inits. 
 | 
protected ReferencePrefix | 
prefix
Access path. 
 | 
| Modifier | Constructor and Description | 
|---|---|
  | 
ArrayReference()
Array reference. 
 | 
private  | 
ArrayReference(Expression[] e,
              ReferencePrefix accessPath)  | 
  | 
ArrayReference(ExtList children,
              ReferencePrefix accessPath)
Constructor for the transformation of COMPOST ASTs to KeY. 
 | 
  | 
ArrayReference(ExtList children,
              ReferencePrefix accessPath,
              PositionInfo pi)
Constructor for the transformation of COMPOST ASTs to KeY. 
 | 
  | 
ArrayReference(ReferencePrefix accessPath,
              Expression[] initializers)
Array reference. 
 | 
| 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. 
 | 
ImmutableArray<Expression> | 
getDimensionExpressions()
Get dimension expressions. 
 | 
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. 
 | 
KeYJavaType | 
getKeYJavaType(Services services,
              ExecutionContext ec)
returns the  
KeYJavaType of an expression | 
ReferencePrefix | 
getReferencePrefix()
Get reference prefix. 
 | 
TypeReference | 
getTypeReferenceAt(int index)  | 
int | 
getTypeReferenceCount()
Get the number of type references in this container. 
 | 
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, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getLastElement, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchequalsModRenaming, getEndPosition, getLastElement, getPositionInfo, getRelativePosition, getStartPositionprotected final ReferencePrefix prefix
protected final ImmutableArray<Expression> inits
public ArrayReference()
public ArrayReference(ReferencePrefix accessPath, Expression[] initializers)
accessPath - a reference prefix.initializers - an expression array.public ArrayReference(ExtList children, ReferencePrefix accessPath, PositionInfo pi)
children - the children of this AST element as KeY classes.
  May contain:
        several of Expression (as initializers of the array),
        Comments.
  MUST NOT CONTAIN: the ReferencePrefix for the accessPath because
    Expression and ReferencePrefix might not be disjunct.accessPath - a ReferencePrefix of the array reference.public ArrayReference(ExtList children, ReferencePrefix accessPath)
children - the children of this AST element as KeY classes.
  May contain:
        several of Expression (as initializers of the array),
        Comments.
  MUST NOT CONTAIN: the ReferencePrefix for the accessPath because
    Expression and ReferencePrefix might not be disjunct.accessPath - a ReferencePrefix of the array reference.private ArrayReference(Expression[] e, ReferencePrefix accessPath)
public int getExpressionCount()
getExpressionCount in interface ExpressionContainerpublic Expression getExpressionAt(int index)
getExpressionAt in interface ExpressionContainerpublic int getTypeReferenceCount()
getTypeReferenceCount in interface TypeReferenceContainerpublic TypeReference getTypeReferenceAt(int index)
getTypeReferenceAt in interface TypeReferenceContainerpublic ReferencePrefix getReferencePrefix()
getReferencePrefix in interface ReferencePrefixpublic int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundspublic ImmutableArray<Expression> getDimensionExpressions()
public SourceElement getFirstElement()
JavaSourceElementgetFirstElement in interface SourceElementgetFirstElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getStartPosition()public SourceElement getFirstElementIncludingBlocks()
SourceElementgetFirstElementIncludingBlocks in interface SourceElementgetFirstElementIncludingBlocks in class JavaSourceElementSourceElement.getStartPosition()public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.public ReferencePrefix setReferencePrefix(ReferencePrefix r)
public KeYJavaType getKeYJavaType(Services services, ExecutionContext ec)
ExpressionKeYJavaType of an expressiongetKeYJavaType in interface Expression