类 Validators


  • public final class Validators
    extends Object
    校验工具
    作者:
    yusiwen
    • 方法详细资料

      • validate

        public static <T> Set<javax.validation.ConstraintViolation<T>> validate​(T object)
        Validates all constraints on object.
        类型参数:
        T - the type of the object to validate
        参数:
        object - object to validate
        返回:
        constraint violations or an empty set if none
        抛出:
        IllegalArgumentException - if object is null or if null is passed to the varargs groups
        javax.validation.ValidationException - if a non recoverable error happens during the validation process