Class ValidatorService.Provider
- java.lang.Object
-
- software.amazon.smithy.model.validation.ValidatorService.Provider
-
- All Implemented Interfaces:
ValidatorService
- Direct Known Subclasses:
AbbreviationNameValidator.Provider
,CamelCaseValidator.Provider
,EmitEachSelectorValidator.Provider
,EmitNoneSelectorValidator.Provider
,InputOutputStructureReuseValidator.Provider
,MissingClientOptionalTrait.Provider
,MissingPaginatedTraitValidator.Provider
,MissingSensitiveTraitValidator.Provider
,NoninclusiveTermsValidator.Provider
,RepeatedShapeNameValidator.Provider
,ReservedWordsValidator.Provider
,ShouldHaveUsedTimestampValidator.Provider
,StandardOperationVerbValidator.Provider
,StutteredShapeNameValidator.Provider
,UnreferencedShapeValidator.Provider
- Enclosing interface:
- ValidatorService
public abstract static class ValidatorService.Provider extends java.lang.Object implements ValidatorService
Provides a simple abstraction for creating validator service subclasses.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.smithy.model.validation.ValidatorService
ValidatorService.Provider
-
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Validator
createValidator(ObjectNode configuration)
Creates a validator using configuration.java.lang.String
getName()
Gets the name of the validator.
-
-
-
Constructor Detail
-
Provider
public Provider(java.lang.String name, java.util.function.Function<ObjectNode,? extends Validator> provider)
-
Provider
public Provider(java.lang.Class<T> klass, java.util.function.Function<ObjectNode,T> provider)
-
Provider
public Provider(java.lang.Class<T> klass, java.util.function.Supplier<T> supplier)
-
-
Method Detail
-
getName
public final java.lang.String getName()
Description copied from interface:ValidatorService
Gets the name of the validator.This name is used to find a matching validator configured in the Smithy model and match it to an implementation.
- Specified by:
getName
in interfaceValidatorService
- Returns:
- Returns the name of the validator it creates.
-
createValidator
public final Validator createValidator(ObjectNode configuration)
Description copied from interface:ValidatorService
Creates a validator using configuration.- Specified by:
createValidator
in interfaceValidatorService
- Parameters:
configuration
- Validator configuration.- Returns:
- Returns the created validator.
-
-