Class SourceMappingWriter

java.lang.Object
com.google.gwt.core.ext.soyc.SourceMappingWriter

class SourceMappingWriter extends Object
Writes a sorted stream of mappings to a sourcemap. Automatically merges mappings that have adjacent or overlapping JavaScript ranges and also point to the same Java line.
  • Constructor Details

    • SourceMappingWriter

      SourceMappingWriter(com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGenerator out)
  • Method Details

    • addMapping

      void addMapping(Range nextRange, String javaName)
      Sends one mapping to the sourcemap.

      The mappings must be sorted by JavaScript starting position.

      The output is buffered, so the caller must call flush() when done.

    • flush

      void flush()
      Writes any buffered mappings to the source map generator.