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:
ActionNameTrait.Provider
,ActionPermissionDescriptionTrait.Provider
,ApiKeySourceTrait.Provider
,AuthorizerTrait.Provider
,CfnMutabilityTrait.Provider
,CfnNameTrait.Provider
,ConditionKeyValueTrait.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 Summary
Constructors Constructor Description Provider(ShapeId id, java.util.function.BiFunction<java.lang.String,SourceLocation,T> traitFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
createTrait(ShapeId id, Node value)
Creates the trait from a node value.-
Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait.Provider
getShapeId
-
-
-
-
Constructor Detail
-
Provider
public Provider(ShapeId id, java.util.function.BiFunction<java.lang.String,SourceLocation,T> traitFactory)
- Parameters:
id
- The name of the trait being created.traitFactory
- The factory used to create the trait.
-
-
Method Detail
-
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.
-
-