Class DynamicTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.model.traits.DynamicTrait
All Implemented Interfaces:
FromSourceLocation, ToNode, ToShapeId, Trait

public final class DynamicTrait extends AbstractTrait
A general-purpose trait used to represent traits that are defined in the model and have no concrete implementation.
  • Constructor Details

    • DynamicTrait

      public DynamicTrait(ShapeId id, Node value)
  • Method Details

    • createNode

      protected 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.