Class SourceMapping


  • public class SourceMapping
    extends java.lang.Object
    Mapping for Source Map.
    • Constructor Summary

      Constructors 
      Constructor Description
      SourceMapping​(int generatedColumn, int sourceLine, java.lang.String sourceFileName)
      Create a mapping between a Java code line and a WebAssembly code position
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addOffset​(int offset)
      Ad an offset to the generated column
      (package private) int getGeneratedColumn()
      The generated column.
      (package private) java.lang.String getSourceFileName()
      Source file name
      (package private) int getSourceLine()
      The source line
      • Methods inherited from class java.lang.Object

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

      • generatedColumn

        private int generatedColumn
      • sourceLine

        private int sourceLine
      • sourceFileName

        private java.lang.String sourceFileName
    • Constructor Detail

      • SourceMapping

        public SourceMapping​(int generatedColumn,
                             int sourceLine,
                             java.lang.String sourceFileName)
        Create a mapping between a Java code line and a WebAssembly code position
        Parameters:
        generatedColumn - position in WebAssembly
        sourceLine - Java source line
        sourceFileName - Java source file
    • Method Detail

      • getGeneratedColumn

        int getGeneratedColumn()
        The generated column. This is equals to the binary offset in the *.wasm file
        Returns:
        binary offset
      • getSourceLine

        int getSourceLine()
        The source line
        Returns:
        the line number
      • getSourceFileName

        java.lang.String getSourceFileName()
        Source file name
        Returns:
        the name
      • addOffset

        public void addOffset​(int offset)
        Ad an offset to the generated column
        Parameters:
        offset - the offset