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.
  • Constructor Details

    • StringListTrait

      public StringListTrait(ShapeId id, List<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 Details

    • 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 class AbstractTrait
      Returns:
      Returns the trait as a node.
    • getValues

      public final List<String> getValues()
      Returns:
      Gets the trait values.