Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface ValidatorService
        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 interface ValidatorService
        Parameters:
        configuration - Validator configuration.
        Returns:
        Returns the created validator.