java.lang.Object
software.amazon.smithy.codegen.core.trace.ShapeLink
All Implemented Interfaces:
ToNode, ToSmithyBuilder<ShapeLink>

public final class ShapeLink extends Object implements ToNode, ToSmithyBuilder<ShapeLink>
Class that defines a link between the Smithy Shape and the artifact that it produced.
  • Field Details

  • Method Details

    • fromNode

      public static ShapeLink fromNode(Node value)
      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

      public static ShapeLink.Builder builder()
    • toNode

      public ObjectNode toNode()
      Converts instance variables into an ObjectNode for writing out a ShapeLink.
      Specified by:
      toNode in interface ToNode
      Returns:
      returns an ObjectNode that contains the StringNodes with the information from a ShapeLink
    • getType

      public String 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

      public String 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

      public List<String> 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

      public Optional<String> 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

      public Optional<Integer> 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

      public Optional<Integer> 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

      public ShapeLink.Builder toBuilder()
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<ShapeLink>
      Returns:
      a builder for type T