Class StringTrait.Provider<T extends StringTrait>

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait.Provider
software.amazon.smithy.model.traits.StringTrait.Provider<T>
All Implemented Interfaces:
TraitService
Direct Known Subclasses:
ActionPermissionDescriptionTrait.Provider, ApiKeySourceTrait.Provider, AuthorizerTrait.Provider, CfnMutabilityTrait.Provider, CfnNameTrait.Provider, DataTrait.Provider, DocumentationTrait.Provider, Ec2QueryNameTrait.Provider, ErrorTrait.Provider, HttpHeaderTrait.Provider, HttpPrefixHeadersTrait.Provider, HttpQueryTrait.Provider, JsonNameTrait.Provider, MediaTypeTrait.Provider, PatternTrait.Provider, PublishTrait.Provider, RequestValidatorTrait.Provider, ResourceIdentifierTrait.Provider, SinceTrait.Provider, SubscribeTrait.Provider, TimestampFormatTrait.Provider, TitleTrait.Provider, XmlNameTrait.Provider
Enclosing class:
StringTrait

public static class StringTrait.Provider<T extends StringTrait> extends AbstractTrait.Provider
Trait provider that expects a string value.
  • Constructor Details

    • Provider

      public Provider(ShapeId id, BiFunction<String,SourceLocation,T> traitFactory)
      Parameters:
      id - The name of the trait being created.
      traitFactory - The factory used to create the trait.
  • Method Details

    • createTrait

      public T createTrait(ShapeId id, Node value)
      Description copied from interface: TraitService
      Creates the trait from a node value.
      Parameters:
      id - The shape targeted by the trait.
      value - The value of the trait.
      Returns:
      Returns the created trait.