public class ValidateAnnotationConstraintGenerator implements ValidationConstraintGenerator
{
public List<String> buildConstraints(Class propertyType, AnnotationProvider annotationProvider)
{
Validate annotation = annotationProvider.getAnnotation(Validate.class);
if (annotation == null)
return null;
return Arrays.asList(annotation.value().split(","));
}