Min min = (Min) annotation;
return new MinValidationRule(min.value());
}
if (Max.class.isInstance(annotation)) {
Max max = (Max) annotation;
return new MaxValidationRule(max.value());
}
throw new IllegalArgumentException("RangeValidationAnnotationHandler does not suppport annotations of type: " +
annotation.getClass().getName());
}