Class ConstraintValidators


  • public final class ConstraintValidators
    extends java.lang.Object
    Utility class to locate an appropriate ConstraintValidator implementation for an annotation.
    Since:
    2.1
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Collection<ConstraintValidator<?>> findValidators​(java.lang.annotation.Annotation... annotations)
      Finds all relevant ConstraintValidator objects from an array of annotations.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • findValidators

        public static java.util.Collection<ConstraintValidator<?>> findValidators​(java.lang.annotation.Annotation... annotations)
        Finds all relevant ConstraintValidator objects from an array of annotations. All validators will be initialized before being returned.
        Parameters:
        annotations - the annotations to find constraint validators for
        Returns:
        a collection of ConstraintValidators for the given annotations