SingleVariableDeclaration checkpoint = ast
.newSingleVariableDeclaration();
String checkpointType = getClassName(Checkpoint.class, state, root);
checkpoint.setType(createType(ast, checkpointType));
checkpoint.setName(ast.newSimpleName("checkpoint"));
method.parameters().add(checkpoint);
// Return type is Object.
method.setReturnType2(createType(ast, getClassName(Object.class, state,
root)));