private void checkCollection(final PropertyMetaData.Builder builder, final Method method, final Size size) { final Class<?> type = builder.getType().getType(); if (Collection.class.isAssignableFrom(type)) { final PropertyElementType elementTypeAnnotation = method.getAnnotation(PropertyElementType.class); final Class<?> elementType = calcElementType(elementTypeAnnotation); final List<? extends PropertyConstraint<?>> elementConstraints = calcElementConstraints(method); Integer min = null; Integer max = null; if (size != null) { min = size.min(); max = size.max(); } final PropertyConstraint<?> propertyConstraint = new ListValueConstraint(elementType, min, max, elementConstraints); builder.add(propertyConstraint); } }