com.google.gwt.core.ext.soyc

## Class SourceMappingWriter

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

-     class SourceMappingWriter
      extends java.lang.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 Summary

    Constructors
    Constructor and Description
    `SourceMappingWriter(com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGenerator out)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `addMapping(Range nextRange, java.lang.String javaName)` Sends one mapping to the sourcemap.
    `(package private) void` | `flush()` Writes any buffered mappings to the source map generator.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SourceMappingWriter

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

  - ### Method Detail

    - #### addMapping

          void addMapping(Range nextRange,
                          java.lang.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.