// Add two parameters.
SingleVariableDeclaration timestamp = ast
.newSingleVariableDeclaration();
timestamp.setType(ast.newPrimitiveType(PrimitiveType.LONG));
timestamp.setName(ast.newSimpleName("timestamp"));
commit.parameters().add(timestamp);
// Add a call to the restore method in the enclosing anonymous class.
MethodInvocation invocation = ast.newMethodInvocation();
invocation.setName(ast.newSimpleName(_getCommitMethodName(true)));
invocation.arguments().add(ast.newSimpleName("timestamp"));