@Override
    public <T extends ConstraintValidator<?, ?>> T getInstance(final Class<T> key) {
        T validator;

        // See if guice has the validator class we are after, i.e. one of our custom validators
        if (key.getCanonicalName().startsWith("stroom.")) {
            try {
                validator = getStroomValidatorInstance(key);
                LOGGER.debug(() -> LogUtil.message("Obtained class {} from Guice injector", key.getName()));
            } catch (ConfigurationException e) {
                throw new RuntimeException(LogUtil.message(
                        "Error getting instance of {} from Guice", key.getCanonicalName(), e));
            }
        } else {
            // Not one of ours so delegate
            validator = delegate.getInstance(key);
            LOGGER.debug(() ->
                    LogUtil.message("Obtained class {} from {}", key.getName(), delegate.getClass().getName()));
        }
        return validator;
    }
@param key The class of the constraint validator to instantiate
@return A new constraint validator instance of the specified class
stroom-util/src/main/java/stroom/util/validation/CustomConstraintValidatorFactory.java