Class TextInstance

java.lang.Object
software.amazon.smithy.model.knowledge.TextInstance

public final class TextInstance extends Object
Contains information about text that occurs in the Smithy IDL written by the owner, inluding location metadata.
  • Method Details

    • getLocationType

      public TextInstance.TextLocationType getLocationType()
      Retrieves the type of TextLocationType associated with the text.
      Returns:
      Returns the TextLocationType.
    • getText

      public String getText()
      Retrieves the text content of the TextInstance.
      Returns:
      Returns the model text.
    • getShape

      public Shape getShape()
      Gets the shape associated with the text.
      Returns:
      Returns the shape if the text is associated with one. Otherwise, returns null.
    • getTrait

      public Trait getTrait()
      Gets the trait associated with the text.
      Returns:
      Returns the trait if the text is associated with one. Otherwise, returns null.
    • getTraitPropertyPath

      public List<String> getTraitPropertyPath()
      Gets the ordered path components within a trait's value the text is associated with.
      Returns:
      Returns the property path if the text is associated with a trait's value.