class CheckpointValidator implements Validator {

    @Override
    public boolean supports(Class<?> cls) {
        return Checkpoint.class.isAssignableFrom(cls);
    }

    @Override
    public void validate(Object target, Errors errors) {<FILL_FUNCTION_BODY>}

}

        Checkpoint cp = ((CheckpointService)target).getRecoveryCheckpoint();
        if(cp==null) {
            return; 
        }
        if(!Checkpoint.hasValidStamp(cp.getCheckpointDir().getFile())) {
            errors.rejectValue(
                "recoveryCheckpoint.checkpointDir",
                null,
                "Configured recovery checkpoint "+cp.getName()
                +" incomplete: lacks valid stamp file.");
        }
    
<no_super_class>