String setCheckpointName = SET_CHECKPOINT_NAME;
MethodInvocation extraSetCheckpoint = ast.newMethodInvocation();
extraSetCheckpoint.setExpression(newNode);
extraSetCheckpoint.setName(ast.newSimpleName(setCheckpointName));
extraSetCheckpoint.arguments().add(ast.newSimpleName(CHECKPOINT_NAME));
CastExpression typeCast = ast.newCastExpression();
typeCast.setExpression(extraSetCheckpoint);
typeCast.setType(createType(ast, getClassName(type.getName(), state,
root)));