char letterMask = ReflectUtil.getAnnoValue(fieldAnnotation, "letterMask", '@');
char anyMask = ReflectUtil.getAnnoValue(fieldAnnotation, "anyMask", '*');
String pattern = ReflectUtil.getAnnoValue(fieldAnnotation, "pattern", "");
String value = (String)field.get(object);
if (value != null) {
MaskMatcher matcher = new MaskMatcher(pattern, digitMask, letterMask, anyMask);
if (!matcher.matches(value))
throw new ValidationException("Field value " + value + " does not match the mask pattern " + pattern + ". Field: " + field.getName());
}
}
});