Interface ValidatorService
-
- All Known Implementing Classes:
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
,ValidatorService.Provider
public interface ValidatorService
Represents a service provider for configurable Validators that appear in Smithy models.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ValidatorService.Provider
Provides a simple abstraction for creating validator service subclasses.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Validator
createValidator(ObjectNode configuration)
Creates a validator using configuration.static java.lang.String
determineValidatorName(java.lang.Class<?> clazz)
Determines the name of a validator based on a class name.java.lang.String
getName()
Gets the name of the validator.
-
-
-
Method Detail
-
getName
java.lang.String getName()
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.
- Returns:
- Returns the name of the validator it creates.
-
createValidator
Validator createValidator(ObjectNode configuration)
Creates a validator using configuration.- Parameters:
configuration
- Validator configuration.- Returns:
- Returns the created validator.
-
determineValidatorName
static java.lang.String determineValidatorName(java.lang.Class<?> clazz)
Determines the name of a validator based on a class name.This method returns the simple name of a class and strips off "Validator" from the end of the name if present.
- Parameters:
clazz
- Class to determine the validator name of.- Returns:
- Returns the validator name based on heuristics.
-
-