Class TracingSymbolProvider.Builder

All Implemented Interfaces:
Enclosing class:

public static final class TracingSymbolProvider.Builder extends Object implements SmithyBuilder<TracingSymbolProvider>
Builder to create a TracingSymbolProvider instance.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • artifactDefinitions

      public TracingSymbolProvider.Builder artifactDefinitions(ArtifactDefinitions artifactDefinitions)
      Sets this Builder's ArtifactDefinitions.
      artifactDefinitions - ArtifactDefinitions for this TracingSymbolProvider's TraceFile.
      This Builder.
    • metadata

      public TracingSymbolProvider.Builder metadata(TraceMetadata metadata)
      Sets this Builder's TraceMetadata.
      metadata - TraceMetadata for this TracingSymbolProvider's TraceFile.
      This Builder.
    • setTraceMetadataAsDefault

      public TracingSymbolProvider.Builder setTraceMetadataAsDefault(String artifactType)
      Sets the Builder's TraceMetadata based on the given type and default values for other required fields. This method should ONLY be used when the version, type, homepage, and typeVersion of the TraceMetadata object is unknown at the time of code generation. This method will ONLY set the required fields of the TraceMetadata.

      The type is set to the artifactType that is passed in. The artifactType is the code language of the generated artifact, e.g. Java.

      The timestamp in TraceMetadata is set to the current time when the method is called.

      The id and version are set to a UUID that should be changed after the TraceFile is constructed and the correct id and version are known.

      artifactType - The type, i.e. language, of the TraceMetadata object.
      This Builder.
    • shapeLinkCreator

      public TracingSymbolProvider.Builder shapeLinkCreator(BiFunction<Shape,Symbol,List<ShapeLink>> shapeLinkCreator)
      Sets this Builder's shapeLinkCreator. The shapeLinkCreator is a function that maps from a Symbol to a List of ShapeLinks. Custom Functions should be designed for each code generator that map apply the tags and types in the definitions files to specific ShapeLinks.
      shapeLinkCreator - A Function that defines a mapping from a Symbol to a List of ShapeLinks.
      This Builder.
    • symbolProvider

      public TracingSymbolProvider.Builder symbolProvider(SymbolProvider symbolProvider)
      Sets this Builder's SymbolProvider.
      symbolProvider - The SymbolProvider that the TracingSymbolProvider will decorate.
      This Builder.
    • build

      public TracingSymbolProvider build()
      Builds a TracingSymbolProvider implementation.
      Specified by:
      build in interface SmithyBuilder<TracingSymbolProvider>
      Built TracingSymbolProvider.