private void processDim(JNewArray x, Context ctx, JArrayType arrayType) {
// override the type of the called method with the array's type
JMethodCall call = new JMethodCall(x.getSourceInfo(), null, initDim,
arrayType);
JLiteral classLit = x.getClassLiteral();
JLiteral typeIdLit = program.getLiteralInt(program.getTypeId(arrayType));
JLiteral queryIdLit = program.getLiteralInt(tryGetQueryId(arrayType));
JExpression dim = x.dims.get(0);
JType elementType = arrayType.getElementType();
call.addArgs(classLit, typeIdLit, queryIdLit, dim,
getSeedTypeLiteralFor(elementType));
ctx.replaceMe(call);