private <T> T getStroomValidatorInstance(final Class<T> clazz) {
        final Object validatorProvider = validatorProviderMap.get(clazz);
        if (validatorProvider == null) {
            throw new RuntimeException("No provider found for validator class " + clazz);
        }

        final Object validator = ((Provider<?>) validatorProvider).get();

        if (validator == null) {
            throw new RuntimeException("Null validator for validator class " + clazz);
        }

        if (!clazz.isAssignableFrom(validator.getClass())) {
            throw new RuntimeException(LogUtil.message("Unexpected class {} for key {}",
                    validator.getClass(), clazz));
        }
        return (T) 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