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
,ServiceResolvedConditionKeysTrait
,SupportedPrincipalTypesTrait
,SuppressTrait
,TagsTrait
Contains abstract functionality to build traits that contain a list
of strings.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
StringListTrait.Builder<TRAIT extends StringListTrait,
BUILDER extends StringListTrait.Builder> Abstract builder to build a StringList trait.static class
StringListTrait.Provider<T extends StringListTrait>
Trait provider that expects a list of string values.static interface
Factory method to create a StringList provider. -
Constructor Summary
ConstructorDescriptionStringListTrait
(ShapeId id, List<String> values, FromSourceLocation sourceLocation) -
Method Summary
Modifier and TypeMethodDescriptionprotected final Node
The 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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:AbstractTrait
The 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:
createNode
in classAbstractTrait
- Returns:
- Returns the trait as a node.
-
getValues
- Returns:
- Gets the trait values.
-