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
public abstract class StringListTrait extends AbstractTrait
Contains abstract functionality to build traits that contain a list of strings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static 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
StringListTrait.StringListTraitConstructor<T extends StringListTrait>
Factory method to create a StringList provider.
-
Constructor Summary
Constructors Constructor Description StringListTrait(ShapeId id, java.util.List<java.lang.String> values, FromSourceLocation sourceLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Node
createNode()
The result of toNode is used for hashCodes and equality.java.util.List<java.lang.String>
getValues()
-
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 Detail
-
StringListTrait
public StringListTrait(ShapeId id, java.util.List<java.lang.String> values, FromSourceLocation sourceLocation)
- Parameters:
id
- The id of the trait being created.values
- The string values of the trait.sourceLocation
- Where the trait was defined.
-
-
Method Detail
-
createNode
protected final Node 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
public final java.util.List<java.lang.String> getValues()
- Returns:
- Gets the trait values.
-
-