static ValidatorFactory createServiceFactory(
            Iterable<Validator> validators,
            Iterable<ValidatorService> services,
            Iterable<ValidationEventDecorator> decorators
    ) {
        List<ValidatorService> serviceList = new ArrayList<>();
        services.forEach(serviceList::add);
        List<Validator> validatorsList = new ArrayList<>();
        validators.forEach(validatorsList::add);
        List<ValidationEventDecorator> decoratorsList = new ArrayList<>();
        decorators.forEach(decoratorsList::add);

        return new ValidatorFactory() {
            @Override
            public List<Validator> loadBuiltinValidators() {
                return Collections.unmodifiableList(validatorsList);
            }

            @Override
            public List<ValidationEventDecorator> loadDecorators() {
                return Collections.unmodifiableList(decoratorsList);
            }

            @Override
            public Optional<Validator> createValidator(String name, ObjectNode configuration) {
                return serviceList.stream()
                        .filter(service -> service.getName().equals(name))
                        .map(service -> service.createValidator(configuration))
                        .findFirst();
            }
        };
    }
Creates a ValidatorFactory that uses a collection of built-in validators
and a collection of ValidatorService instances for configurable validators.

<p>The validators and services passed to this method are copied into a
List before creating the actual factory to avoid holding on to
{@code ServiceLoader} VM-wide instances that potentially utilize a
Thread's context ClassLoader.

@param validators Built-in validators to provide from the factory.
@param services ValidatorService instances to use to create validators.
@param decorators ValidationEventDecorator instances to use to create decorators.
@return Returns the created ValidatorFactory.
smithy-model/src/main/java/software/amazon/smithy/model/validation/ValidatorFactory.java