Class OriginalShapeIdTrait
java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.model.traits.synthetic.OriginalShapeIdTrait
- All Implemented Interfaces:
- FromSourceLocation,- ToNode,- ToShapeId,- Trait
Used to provide the original shape ID of a shape that is renamed
 in the semantic model.
 
This is a synthetic trait that is not defined in the semantic model, nor is it persisted when the model is serialized.
- 
Nested Class SummaryNested classes/interfaces inherited from class software.amazon.smithy.model.traits.AbstractTraitAbstractTrait.Provider
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected NodeThe result of toNode is used for hashCodes and equality.Gets the original shape ID of the shape before it was renamed.booleanChecks if this trait is persisted with the shape, or if it is a synthetic, or transient trait, only meant to temporarily aid in some kind of in-memory model transformation.Methods inherited from class software.amazon.smithy.model.traits.AbstractTraitequals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toString
- 
Field Details- 
ID
 
- 
- 
Constructor Details- 
OriginalShapeIdTrait
 
- 
- 
Method Details- 
getOriginalIdGets the original shape ID of the shape before it was renamed.- Returns:
- Returns the shape original shape ID.
 
- 
isSyntheticpublic boolean isSynthetic()Description copied from interface:TraitChecks if this trait is persisted with the shape, or if it is a synthetic, or transient trait, only meant to temporarily aid in some kind of in-memory model transformation.Because synthetic traits are not persisted with shapes, they also do not need to be defined in Smithy's semantic model before they can be used in the model. - Returns:
- Returns true if the trait is not persisted on the shape.
 
- 
createNodeDescription copied from class:AbstractTraitThe 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:
- createNodein class- AbstractTrait
- Returns:
- Returns the trait as a node.
 
 
-