Class TracingSymbolProvider.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • artifactDefinitions

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

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

        public TracingSymbolProvider.Builder setTraceMetadataAsDefault​(java.lang.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.

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

        public TracingSymbolProvider.Builder shapeLinkCreator​(java.util.function.BiFunction<Shape,​Symbol,​java.util.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.
        Parameters:
        shapeLinkCreator - A Function that defines a mapping from a Symbol to a List of ShapeLinks.
        Returns:
        This Builder.
      • symbolProvider

        public TracingSymbolProvider.Builder symbolProvider​(SymbolProvider symbolProvider)
        Sets this Builder's SymbolProvider.
        Parameters:
        symbolProvider - The SymbolProvider that the TracingSymbolProvider will decorate.
        Returns:
        This Builder.