Class TextInstance
- java.lang.Object
- 
- software.amazon.smithy.model.knowledge.TextInstance
 
- 
 public final class TextInstance extends java.lang.ObjectContains information about text that occurs in the Smithy IDL written by the owner, inluding location metadata.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classTextInstance.TextLocationTypeEnum type indicating what kind of location in the model associated text appeared in.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description TextInstance.TextLocationTypegetLocationType()Retrieves the type of TextLocationType associated with the text.ShapegetShape()Gets the shape associated with the text.java.lang.StringgetText()Retrieves the text content of the TextInstance.TraitgetTrait()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.
 
- 
- 
- 
Method Detail- 
getLocationTypepublic TextInstance.TextLocationType getLocationType() Retrieves the type of TextLocationType associated with the text.- Returns:
- Returns the TextLocationType.
 
 - 
getTextpublic java.lang.String getText() Retrieves the text content of the TextInstance.- Returns:
- Returns the model text.
 
 - 
getShapepublic Shape getShape() Gets the shape associated with the text.- Returns:
- Returns the shape if the text is associated with one. Otherwise, returns null.
 
 - 
getTraitpublic Trait getTrait() Gets the trait associated with the text.- Returns:
- Returns the trait if the text is associated with one. Otherwise, returns null.
 
 - 
getTraitPropertyPathpublic 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.
 
 
- 
 
-