Class TextInstance


  • public final class TextInstance
    extends java.lang.Object
    Contains information about text that occurs in the Smithy IDL written by the owner, inluding location metadata.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  TextInstance.TextLocationType
      Enum type indicating what kind of location in the model associated text appeared in.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TextInstance.TextLocationType getLocationType()
      Retrieves the type of TextLocationType associated with the text.
      Shape getShape()
      Gets the shape associated with the text.
      java.lang.String getText()
      Retrieves the text content of the TextInstance.
      Trait getTrait()
      Gets the trait associated with the text.
      java.util.List<java.lang.String> getTraitPropertyPath()
      Gets the ordered path components within a trait's value the text is associated with.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getLocationType

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

        public java.lang.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 java.util.List<java.lang.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.