}
property.addFacet(facet);
}
if (helper.isAnnotationPresent(element, Size.class)) {
Size a = (Size) helper.getAnnotation(element, Size.class);
final int min = a.min();
final int max = a.max();
if (min != 0 || max != Integer.MAX_VALUE) { // Fixes generation of an empty facet.
if ("java.lang.String".equals(property.getType().getName())) { // @Size serves for both length facet and occurs restriction.
SizeFacet facet = new SizeFacet(min, max); // For minLength, maxLength.
property.addFacet(facet);