Class SourceMapping
- java.lang.Object
-
- de.inetsoftware.jwebassembly.sourcemap.SourceMapping
-
public class SourceMapping extends java.lang.ObjectMapping for Source Map.
-
-
Field Summary
Fields Modifier and Type Field Description private intgeneratedColumnprivate java.lang.StringsourceFileNameprivate intsourceLine
-
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 voidaddOffset(int offset)Ad an offset to the generated column(package private) intgetGeneratedColumn()The generated column.(package private) java.lang.StringgetSourceFileName()Source file name(package private) intgetSourceLine()The source line
-
-
-
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 WebAssemblysourceLine- Java source linesourceFileName- 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
-
-