class CheckExpressionTypeValidator implements ConstraintValidator<CheckExpressionType, ClientExpressionContainer>, ValidationErrorDescriptorBuilder {

    @Override
    public ErrorDescriptor build(ConstraintViolation violation) {
        String type = ((ClientExpressionContainer) violation.getInvalidValue()).getObject().getClass().getSimpleName();

        return createDescriptorFrom(violation.getMessageTemplate(), type);
    }

}