Package org.kiwiproject.validation
Class InEnumValidator
java.lang.Object
org.kiwiproject.validation.InEnumValidator
public class InEnumValidator
extends Object
implements jakarta.validation.ConstraintValidator<InEnum,String>
Validates that a string value is in the list of enum constants, or a value derived from an enum constant.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
InEnumValidator
public InEnumValidator()
-
-
Method Details
-
initialize
- Specified by:
initializein interfacejakarta.validation.ConstraintValidator<InEnum,String> - Parameters:
constraintAnnotation- the InEnum annotation- Throws:
IllegalStateException- if the enum has no constants or if using a valueMethod which throws an exception when called
-
isValid
-