Package com.pig4cloud.plugin.excel.kit
Class Validators
- java.lang.Object
-
- com.pig4cloud.plugin.excel.kit.Validators
-
public final class Validators extends java.lang.Object校验工具- Author:
- L.cm
-
-
Field Summary
Fields Modifier and Type Field Description private static javax.validation.ValidatorVALIDATOR
-
Constructor Summary
Constructors Modifier Constructor Description privateValidators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.Set<javax.validation.ConstraintViolation<T>>validate(T object)Validates all constraints onobject.
-
-
-
Method Detail
-
validate
public static <T> java.util.Set<javax.validation.ConstraintViolation<T>> validate(T object)
Validates all constraints onobject.- Type Parameters:
T- the type of the object to validate- Parameters:
object- object to validate- Returns:
- constraint violations or an empty set if none
- Throws:
java.lang.IllegalArgumentException- if object isnullor ifnullis passed to the varargs groupsjavax.validation.ValidationException- if a non recoverable error happens during the validation process
-
-