Class TracingSymbolProvider

All Implemented Interfaces:

public final class TracingSymbolProvider extends Object implements SymbolProvider
Decorates a SymbolProvider with a TraceFile.Builder and adds a ShapeLink object to the builder on each call to toSymbol.
  • Method Details

    • builder

      public static TracingSymbolProvider.Builder builder()
      Builder to create a TracingSymbolProvider instance.
      Returns a new Builder.
    • buildTraceFile

      public TraceFile buildTraceFile()
      Builds and returns the TracingSymbolProvider's TraceFile.Builder.
      The TraceFile built from this TracingSymbolProvider's TraceFile.Builder.
    • toSymbol

      public Symbol toSymbol(Shape shape)
      Converts a shape into a symbol by calling the toSymbol method of the SymbolProvider used to construct this TracingSymbolProvider. Adds a list of ShapeLinks to the TracingSymbolProvider's TraceFile.Builder.
      Specified by:
      toSymbol in interface SymbolProvider
      shape - Shape to convert to Symbol.
      Symbol created from Shape.
    • toMemberName

      public String toMemberName(MemberShape shape)
      Description copied from interface: SymbolProvider
      Converts a member shape to a member/property name of a containing data structure.

      The default implementation will return the member name of the provided shape ID and should be overridden if necessary.

      Specified by:
      toMemberName in interface SymbolProvider
      shape - Shape to convert.
      Returns the converted member name.