MinSize minSize = (MinSize) annotation;
return new MinSizeValidationRule(minSize.value());
}
if (MaxSize.class.isInstance(annotation)) {
MaxSize maxSize = (MaxSize) annotation;
return new MaxSizeValidationRule(maxSize.value());
}
throw new IllegalArgumentException("SizeValidationAnnotationHandler cannot handle annotation of type: " +
annotation.getClass().getName());
}