Range range = (Range) annotation;
return new RangeValidationRule(range.min(), range.max());
}
if (Min.class.isInstance(annotation)) {
Min min = (Min) annotation;
return new MinValidationRule(min.value());
}
if (Max.class.isInstance(annotation)) {
Max max = (Max) annotation;
return new MaxValidationRule(max.value());
}