-
@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) public @interface ConstraintRule
Use this annotation to define custom validator.- Since:
- 0.1
- Author:
- nedis
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<?>[]supportedTypesReturns all supported types, which can be validated by constraint annotation.Class<? extends ConstraintValidator>[]validatorClassReturnsConstraintValidatorclass per each supported type, i.e.
-
-
-
Element Detail
-
supportedTypes
Class<?>[] supportedTypes
Returns all supported types, which can be validated by constraint annotation.- Returns:
- all supported types, which can be validated by constraint annotation
-
-
-
validatorClass
Class<? extends ConstraintValidator>[] validatorClass
ReturnsConstraintValidatorclass per each supported type, i.e.supportedTypes.lengthmust be equal tovalidatorClass.length, otherwise compile error will be thrown.- Returns:
ConstraintValidatorclass per each supported type
-
-