Class StringListTrait
java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.model.traits.StringListTrait
- All Implemented Interfaces:
FromSourceLocation,ToNode,ToShapeId,Trait
- Direct Known Subclasses:
ConditionKeysTrait,RequiredActionsTrait,SupportedPrincipalTypesTrait,SuppressTrait,TagsTrait
Contains abstract functionality to build traits that contain a list
of strings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStringListTrait.Builder<TRAIT extends StringListTrait,BUILDER extends StringListTrait.Builder> Abstract builder to build a StringList trait.static classStringListTrait.Provider<T extends StringListTrait>Trait provider that expects a list of string values.static interfaceFactory method to create a StringList provider. -
Constructor Summary
ConstructorsConstructorDescriptionStringListTrait(ShapeId id, List<String> values, FromSourceLocation sourceLocation) -
Method Summary
Modifier and TypeMethodDescriptionprotected final NodeThe result of toNode is used for hashCodes and equality.Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic
-
Constructor Details
-
StringListTrait
- Parameters:
id- The id of the trait being created.values- The string values of the trait.sourceLocation- Where the trait was defined.
-
-
Method Details
-
createNode
Description copied from class:AbstractTraitThe result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.- Specified by:
createNodein classAbstractTrait- Returns:
- Returns the trait as a node.
-
getValues
- Returns:
- Gets the trait values.
-