JMethodCall call = new JMethodCall(sourceInfo, null, initDims, arrayType);
JsonArray castableTypeMaps = new JsonArray(sourceInfo, program.getJavaScriptObject());
JsonArray elementTypeReferences = new JsonArray(sourceInfo, program.getJavaScriptObject());
JsonArray dimList = new JsonArray(sourceInfo, program.getJavaScriptObject());
JType currentElementType = arrayType;
JLiteral classLit = x.getLeafTypeClassLiteral();
for (int i = 0; i < dims; ++i) {
// Walk down each type from most dims to least.
JArrayType curArrayType = (JArrayType) currentElementType;
JExpression castableTypeMap = getOrCreateCastMap(sourceInfo, curArrayType);