public ConstraintDescriptorImpl(Annotation annotation,
String[] groups,
Constraint validator,
Class constraintClass) {
this.annotation = annotation;
if ( groups.length == 0 ) {
groups = new String[] { "default" };
}
this.groups = new HashSet< String >();
this.groups.addAll( Arrays.asList( groups ) );
this.constraintImplementation = validator;
this.parameters = getAnnotationParameters( annotation );
this.isReportAsSingleInvalidConstraint = annotation.annotationType().isAnnotationPresent(
ReportAsViolationFromCompositeConstraint.class
);
this.constraintClass = constraintClass;
}
|