Class SourceMapGeneratorV2.LineMapEncoder

  • Enclosing class:
    SourceMapGeneratorV2

    public static class SourceMapGeneratorV2.LineMapEncoder
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      LineMapEncoder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void encodeEntry​(java.lang.Appendable out, int id, int lastId, int reps)
      The source map line map is consists of a series of entries each representing a map entry and a repetition count of that entry.
      static int getRelativeMappingId​(int id, int idLength, int lastId)  
      static int getRelativeMappingIdLength​(int rawId, int lastId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LineMapEncoder

        public LineMapEncoder()
    • Method Detail

      • encodeEntry

        public static void encodeEntry​(java.lang.Appendable out,
                                       int id,
                                       int lastId,
                                       int reps)
                                throws java.io.IOException
        The source map line map is consists of a series of entries each representing a map entry and a repetition count of that entry.
        Parameters:
        out - The entry destination.
        id - The id for the entry.
        lastId - The previous id written, used to generate a relative map id.
        reps - The number of times the id is repeated in the map.
        Throws:
        java.io.IOException
      • getRelativeMappingId

        public static int getRelativeMappingId​(int id,
                                               int idLength,
                                               int lastId)
        Parameters:
        idLength - the length relative id, when encoded in as a base64 value. @see #getRelativeMappingIdLength
        Returns:
        A value relative to the the lastId. Negative value are represented as a two-complement value.
      • getRelativeMappingIdLength

        public static int getRelativeMappingIdLength​(int rawId,
                                                     int lastId)
        Returns:
        The length of the base64 number needed to include the id.