Class SourceMap.File

  • Enclosing class:
    SourceMap

    public static class SourceMap.File
    extends java.lang.Object
    Defines a source code file within a source map stratum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int id
      File index in stratum
      int lineOffset
      The base line offset for this stratum, line numbers in the output will be offset by this amount from their originals
      int size
      The size of this stratum (number of lines)
      java.lang.String sourceFileName
      Actual source file name to include in the smap
      java.lang.String sourceFilePath
      Full path to the source file
    • Constructor Summary

      Constructors 
      Constructor Description
      File​(int id, int lineOffset, int size, java.lang.String sourceFileName)
      Create a new SMAP Stratum
      File​(int id, int lineOffset, int size, java.lang.String sourceFileName, java.lang.String sourceFilePath)
      Create a new SMAP Stratum
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendLines​(java.lang.StringBuilder sb)
      Append lines representing this File to the supplied StringBuilder
      void applyOffset​(org.objectweb.asm.tree.ClassNode classNode)
      Offset the line numbers in the target class node by the base lineoffset for this stratum
      void applyOffset​(org.objectweb.asm.tree.MethodNode method)
      Offset the line numbers in the target method node by the base lineoffset for this stratum
      • Methods inherited from class java.lang.Object

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

      • id

        public final int id
        File index in stratum
      • lineOffset

        public final int lineOffset
        The base line offset for this stratum, line numbers in the output will be offset by this amount from their originals
      • size

        public final int size
        The size of this stratum (number of lines)
      • sourceFileName

        public final java.lang.String sourceFileName
        Actual source file name to include in the smap
      • sourceFilePath

        public final java.lang.String sourceFilePath
        Full path to the source file
    • Constructor Detail

      • File

        public File​(int id,
                    int lineOffset,
                    int size,
                    java.lang.String sourceFileName)
        Create a new SMAP Stratum
        Parameters:
        lineOffset - line offset
        size - total lines
        sourceFileName - source file name
      • File

        public File​(int id,
                    int lineOffset,
                    int size,
                    java.lang.String sourceFileName,
                    java.lang.String sourceFilePath)
        Create a new SMAP Stratum
        Parameters:
        lineOffset - line offset
        size - total lines
        sourceFileName - source file name
        sourceFilePath - source path
    • Method Detail

      • applyOffset

        public void applyOffset​(org.objectweb.asm.tree.ClassNode classNode)
        Offset the line numbers in the target class node by the base lineoffset for this stratum
        Parameters:
        classNode - class to operate upon
      • applyOffset

        public void applyOffset​(org.objectweb.asm.tree.MethodNode method)
        Offset the line numbers in the target method node by the base lineoffset for this stratum
        Parameters:
        method - method to operate upon
      • appendLines

        public void appendLines​(java.lang.StringBuilder sb)
        Append lines representing this File to the supplied StringBuilder
        Parameters:
        sb - StringBuilder to append to