class EnumValueValidator implements ConstraintValidator<EnumValue, Enum<?>> {

    private Set<String> disallowedValues;

    @Override
    public void initialize(final EnumValue constraintAnnotation) {
        disallowedValues = Set.copyOf(Arrays.asList(constraintAnnotation.disallowed()));
    }

    @Override
    public boolean isValid(final Enum<?> value, final ConstraintValidatorContext context) {<FILL_FUNCTION_BODY>}

}

        if (value == null) {
            return true;
        }

        return !disallowedValues.contains(value.name());
    
<no_super_class>