ConvertGroup groupConversion = null;
ConvertGroup.List groupConversionList = null;
if ( annotationProcessingOptions.areParameterConstraintsIgnoredFor( executable.getMember(), i ) ) {
metaData.add(
new ConstrainedParameter(
ConfigurationSource.ANNOTATION,
ConstraintLocation.forParameter( executable, i ),
ReflectionHelper.typeOf( executable, i ),
i,
parameterName,
parameterConstraints,
typeArgumentsConstraints,
getGroupConversions( groupConversion, groupConversionList ),
false,
UnwrapMode.AUTOMATIC
)
);
i++;
continue;
}
UnwrapMode unwrapMode = UnwrapMode.AUTOMATIC;
for ( Annotation parameterAnnotation : parameterAnnotations ) {
//1. mark parameter as cascading if this annotation is the @Valid annotation
if ( parameterAnnotation.annotationType().equals( Valid.class ) ) {
parameterIsCascading = true;
}
//2. determine group conversions
else if ( parameterAnnotation.annotationType().equals( ConvertGroup.class ) ) {
groupConversion = (ConvertGroup) parameterAnnotation;
}
else if ( parameterAnnotation.annotationType().equals( ConvertGroup.List.class ) ) {
groupConversionList = (ConvertGroup.List) parameterAnnotation;
}
//3. unwrapping required?
else if ( parameterAnnotation.annotationType().equals( UnwrapValidatedValue.class ) ) {
UnwrapValidatedValue unwrapValidatedValue = (UnwrapValidatedValue) parameterAnnotation;
unwrapMode = unwrapValidatedValue.value() ? UnwrapMode.UNWRAP : UnwrapMode.SKIP_UNWRAP;
}
//4. collect constraints if this annotation is a constraint annotation
List<ConstraintDescriptorImpl<?>> constraints = findConstraintAnnotations(
executable.getMember(), parameterAnnotation, ElementType.PARAMETER
);
for ( ConstraintDescriptorImpl<?> constraintDescriptorImpl : constraints ) {
parameterConstraints.add(
createParameterMetaConstraint( executable, i, constraintDescriptorImpl )
);
}
}
typeArgumentsConstraints = findTypeAnnotationConstraintsForExecutableParameter( executable.getMember(), i );
// if there are type annotation constraints for a parameter which is not an iterable, we force the unwrapping
if ( !typeArgumentsConstraints.isEmpty() ) {
if ( !ReflectionHelper.isIterable( ReflectionHelper.typeOf( executable, i ) ) ) {
unwrapMode = UnwrapMode.UNWRAP;
}
}
metaData.add(
new ConstrainedParameter(
ConfigurationSource.ANNOTATION,
ConstraintLocation.forParameter( executable, i ),
ReflectionHelper.typeOf( executable, i ),
i,
parameterName,