String fieldName, Type fieldType, int indices, boolean special) {
Block block = ast.newBlock();
// Test if the checkpoint object is not null.
IfStatement ifStatement = ast.newIfStatement();
InfixExpression testExpression = ast.newInfixExpression();
InfixExpression condition1 = ast.newInfixExpression();
condition1.setLeftOperand(ast.newSimpleName(CHECKPOINT_NAME));
condition1.setOperator(InfixExpression.Operator.NOT_EQUALS);
condition1.setRightOperand(ast.newNullLiteral());
InfixExpression condition2 = ast.newInfixExpression();
MethodInvocation getTimestamp = ast.newMethodInvocation();
getTimestamp.setExpression(ast.newSimpleName(CHECKPOINT_NAME));
getTimestamp.setName(ast.newSimpleName("getTimestamp"));
condition2.setLeftOperand(getTimestamp);
condition2.setOperator(InfixExpression.Operator.GREATER);
condition2.setRightOperand(ast.newNumberLiteral("0"));
testExpression.setLeftOperand(condition1);
testExpression.setOperator(InfixExpression.Operator.CONDITIONAL_AND);
testExpression.setRightOperand(condition2);
ifStatement.setExpression(testExpression);