public abstract class InitArray extends ProgramTransformer
Constructor and Description |
---|
InitArray(java.lang.String name,
ProgramElement body) |
Modifier and Type | Method and Description |
---|---|
protected void |
createArrayAssignments(int p_start,
Statement[] p_statements,
ProgramVariable[] p_initializers,
ReferencePrefix p_array,
NewArray p_creationExpression)
Convert the variable initializers to assignments to the array
elements (the initializers may itself be array initializers, in
which case valid creation expressions are created by inserting
the new-operator)
|
protected Expression |
createArrayCreation(NewArray p_creationExpression)
Create an array creation expression for an array of the size
given by the array initializer
|
protected Statement |
createAssignment(ReferencePrefix p_array,
int p_index,
Expression p_initializer,
KeYJavaType p_elementType,
TypeReference p_baseType)
Convert one variable initializers to an assignment to the
appropriate array element (the initializer may itself be an
array initializer, in which case a valid creation expression is
created by inserting the new-operator)
|
protected ProgramVariable[] |
evaluateInitializers(Statement[] p_stmnts,
NewArray p_creationExpression,
Services services)
The variable initializers have to be evaluated and assigned to
temporary variables (the initializers may itself be array
initializers, in which case valid creation expressions are
created by inserting the new-operator)
|
protected ImmutableArray<Expression> |
extractInitializers(NewArray p_creationExpression)
Extract the variable initializers from the array initializer
|
protected KeYJavaType |
getElementType(NewArray p_creationExpression) |
body, getChildAt, getChildCount, getDimensions, getExpressionAt, getExpressionCount, getKeYJavaType, getKeYJavaType, getKeYJavaType, getLastElement, getName, getPackageReference, getProgramElementName, getReferencePrefix, getStatementAt, getStatementCount, getTypeReferenceAt, getTypeReferenceCount, name, neededInstantiations, needs, prettyPrint, setReferencePrefix, toString, transform, visit
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments, match
public InitArray(java.lang.String name, ProgramElement body)
protected ImmutableArray<Expression> extractInitializers(NewArray p_creationExpression)
protected KeYJavaType getElementType(NewArray p_creationExpression)
protected Expression createArrayCreation(NewArray p_creationExpression)
protected ProgramVariable[] evaluateInitializers(Statement[] p_stmnts, NewArray p_creationExpression, Services services)
protected void createArrayAssignments(int p_start, Statement[] p_statements, ProgramVariable[] p_initializers, ReferencePrefix p_array, NewArray p_creationExpression)
protected Statement createAssignment(ReferencePrefix p_array, int p_index, Expression p_initializer, KeYJavaType p_elementType, TypeReference p_baseType)