* @see Instruction#execute()
*/
@Override
public void execute() throws CoreException {
if (fHasInitializer) {
IJavaArray array = (IJavaArray) popValue();
pop(); // pop the type
push(array);
} else {
int[] exprDimensions = new int[fExprDimension];
for (int i = fExprDimension - 1; i >= 0; i--) {
exprDimensions[i] = ((IJavaPrimitiveValue) popValue())
.getIntValue();
}
IJavaType type = (IJavaType) pop();
fCachedArrayTypes = new IJavaArrayType[fDimension + 1];
for (int i = fDimension, lim = fDimension - fExprDimension; i > lim; i--) {
fCachedArrayTypes[i] = (IJavaArrayType) type;
type = ((IJavaArrayType) type).getComponentType();
}
IJavaArray array = createArray(fDimension, exprDimensions);
push(array);
}
}