Class<? extends Annotation> annotationType = constraintAnnotation.annotationType();
for( Class<? extends Constraint<?, ?>> constraint : constraintClasses )
{
if( helper.appliesTo( constraint, annotationType, valueType ) )
{
constraintModels.add( new ConstraintModel( constraintAnnotation, constraint ) );
continue nextConstraint;
}
}
// Check the annotation itself
Constraints constraints = annotationType.getAnnotation( Constraints.class );
if( constraints != null )
{
for( Class<? extends Constraint<?, ?>> constraintClass : constraints.value() )
{
if( helper.appliesTo( constraintClass, annotationType, valueType ) )
{
constraintModels.add( new ConstraintModel( constraintAnnotation, constraintClass ) );
continue nextConstraint;
}
}
}