コード例 #1
0
 @SuppressWarnings("rawtypes")
 public void validate(Object target, Errors errors, Object... validationHints) {
   Set<Class> groups = new LinkedHashSet<Class>();
   if (validationHints != null) {
     for (Object hint : validationHints) {
       if (hint instanceof Class) {
         groups.add((Class) hint);
       }
     }
   }
   processConstraintViolations(
       this.targetValidator.validate(target, groups.toArray(new Class[groups.size()])), errors);
 }
コード例 #2
0
 @Override
 public void validate(Object target, Errors errors, Object... validationHints) {
   if (this.targetValidator != null) {
     Set<Class<?>> groups = new LinkedHashSet<Class<?>>();
     if (validationHints != null) {
       for (Object hint : validationHints) {
         if (hint instanceof Class) {
           groups.add((Class<?>) hint);
         }
       }
     }
     processConstraintViolations(
         this.targetValidator.validate(target, groups.toArray(new Class<?>[groups.size()])),
         errors);
   }
 }
コード例 #3
0
 public void validate(Object target, Errors errors) {
   processConstraintViolations(this.targetValidator.validate(target), errors);
 }