Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.dropwizard.validation;
 
A validator for ValidationMethod-annotated methods.
 
 public class MethodValidator implements ConstraintValidator<ValidationMethodBoolean> {
    @Override
    public void initialize(ValidationMethod constraintAnnotation) {
    }
    @Override
    public boolean isValid(Boolean valueConstraintValidatorContext context) {
        return (value == null) || value;
    }
New to GrepCode? Check out our FAQ X