Class TextInstance
java.lang.Object
software.amazon.smithy.model.knowledge.TextInstance
Contains information about text that occurs in the Smithy IDL written by the owner,
inluding location metadata.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enum type indicating what kind of location in the model associated text appeared in. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the type of TextLocationType associated with the text.getShape()
Gets the shape associated with the text.getText()
Retrieves the text content of the TextInstance.getTrait()
Gets the trait associated with the text.Gets the ordered path components within a trait's value the text is associated with.
-
Method Details
-
getLocationType
Retrieves the type of TextLocationType associated with the text.- Returns:
- Returns the TextLocationType.
-
getText
Retrieves the text content of the TextInstance.- Returns:
- Returns the model text.
-
getShape
Gets the shape associated with the text.- Returns:
- Returns the shape if the text is associated with one. Otherwise, returns null.
-
getTrait
Gets the trait associated with the text.- Returns:
- Returns the trait if the text is associated with one. Otherwise, returns null.
-
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.
-