Class ShapeLink
java.lang.Object
software.amazon.smithy.codegen.core.trace.ShapeLink
- All Implemented Interfaces:
ToNode
,ToSmithyBuilder<ShapeLink>
Class that defines a link between the Smithy
Shape
and
the artifact that it produced.-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShapeLink.Builder
builder()
static ShapeLink
Instantiates ShapeLink instance variables by extracting data from an ObjectNode.Gets this ShapeLink's column number in an optional container.getFile()
Gets this ShapeLink's file in an optional container.getId()
Gets this ShapeLink's id.getLine()
Gets this ShapeLink's line number in an optional container.getTags()
Gets this ShapeLink's tags list.getType()
Gets this ShapeLink's type.Take this object and create a builder that contains all of the current property values of this object.toNode()
Converts instance variables into an ObjectNode for writing out a ShapeLink.
-
Field Details
-
TYPE_TEXT
- See Also:
-
ID_TEXT
- See Also:
-
TAGS_TEXT
- See Also:
-
FILE_TEXT
- See Also:
-
LINE_TEXT
- See Also:
-
COLUMN_TEXT
- See Also:
-
-
Method Details
-
fromNode
Instantiates ShapeLink instance variables by extracting data from an ObjectNode.- Parameters:
value
- an ObjectNode that represents the a single ShapeLink- Returns:
- a ShapeLink created from the ObjectNode
-
builder
-
toNode
Converts instance variables into an ObjectNode for writing out a ShapeLink. -
getType
Gets this ShapeLink's type. The type is the type of the artifact component. This value MUST correspond to one of the types defined in the /definitions/types property of the trace file.- Returns:
- this ShapeLink's type
-
getId
Gets this ShapeLink's id. Id is the artifact-specific identifier for the artifact component. For example, in Java a valid id would be the fully-qualified name of a class, method, or field as defined in Documentation Comment Specification for the Standard Doclet- Returns:
- this ShapeLink's id
-
getTags
Gets this ShapeLink's tags list. Tags defines a list of tags to apply to the trace link. Each tag MUST correspond to a tag defined in the /definitions/tags property of the trace file.- Returns:
- This ShapeLink's list of tags
-
getFile
Gets this ShapeLink's file in an optional container. File is a URI that defines the location of the artifact component. Files MUST use the "file" URI scheme, and SHOULD be relative.- Returns:
- Optional container holding this ShapeLink's file
-
getLine
Gets this ShapeLink's line number in an optional container. Line is the line number in the file that contains the artifact component.- Returns:
- Optional container holding this ShapeLink's line number
-
getColumn
Gets this ShapeLink's column number in an optional container. Column is the column number in the file that contains the artifact component.- Returns:
- Optional container holding this ShapeLink's column number
-
toBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<ShapeLink>
- Returns:
- a builder for type T
-