public abstract static class ValidatorService.Provider extends java.lang.Object implements ValidatorService
ValidatorService.Provider
Constructor and Description |
---|
Provider(java.lang.Class<T> klass,
java.util.function.Function<ObjectNode,T> provider) |
Provider(java.lang.Class<T> klass,
java.util.function.Supplier<T> supplier) |
Provider(java.lang.String name,
java.util.function.Function<ObjectNode,? extends Validator> provider) |
Modifier and Type | Method and Description |
---|---|
Validator |
createValidator(ObjectNode configuration)
Creates a validator using configuration.
|
java.lang.String |
getName()
Gets the name of the validator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
determineValidatorName
public Provider(java.lang.String name, java.util.function.Function<ObjectNode,? extends Validator> provider)
public Provider(java.lang.Class<T> klass, java.util.function.Function<ObjectNode,T> provider)
public Provider(java.lang.Class<T> klass, java.util.function.Supplier<T> supplier)
public final java.lang.String getName()
ValidatorService
This name is used to find a matching validator configured in the Smithy model and match it to an implementation.
getName
in interface ValidatorService
public final Validator createValidator(ObjectNode configuration)
ValidatorService
createValidator
in interface ValidatorService
configuration
- Validator configuration.