public final class SourceMap
extends java.lang.Object
CodeConsumer
,
CodeGenerator
,
CodePrinter
Modifier and Type | Class and Description |
---|---|
static class |
SourceMap.DetailLevel
Source maps can be very large different levels of detail can be specified.
|
static class |
SourceMap.Format
An enumeration of available source map formats
|
static class |
SourceMap.LocationMapping
A simple pair of path prefixes to the desired "destination" location to use within the
source map.
|
Modifier and Type | Field and Description |
---|---|
private SourceMapGenerator |
generator |
private java.util.List<SourceMap.LocationMapping> |
prefixMappings |
private java.util.Map<java.lang.String,java.lang.String> |
sourceLocationFixupCache |
Modifier | Constructor and Description |
---|---|
private |
SourceMap(SourceMapGenerator generator) |
Modifier and Type | Method and Description |
---|---|
void |
addMapping(Node node,
FilePosition outputStartPosition,
FilePosition outputEndPosition) |
void |
appendTo(java.lang.Appendable out,
java.lang.String name) |
private java.lang.String |
fixupSourceLocation(java.lang.String sourceFile) |
void |
reset() |
void |
setPrefixMappings(java.util.List<SourceMap.LocationMapping> sourceMapLocationMappings) |
void |
setStartingPosition(int offsetLine,
int offsetIndex) |
void |
setWrapperPrefix(java.lang.String prefix) |
void |
validate(boolean validate) |
private final SourceMapGenerator generator
private java.util.List<SourceMap.LocationMapping> prefixMappings
private final java.util.Map<java.lang.String,java.lang.String> sourceLocationFixupCache
private SourceMap(SourceMapGenerator generator)
public void addMapping(Node node, FilePosition outputStartPosition, FilePosition outputEndPosition)
private java.lang.String fixupSourceLocation(java.lang.String sourceFile)
sourceFile
- The source file location to fixup.public void appendTo(java.lang.Appendable out, java.lang.String name) throws java.io.IOException
java.io.IOException
public void reset()
public void setStartingPosition(int offsetLine, int offsetIndex)
public void setWrapperPrefix(java.lang.String prefix)
public void validate(boolean validate)
public void setPrefixMappings(java.util.List<SourceMap.LocationMapping> sourceMapLocationMappings)
sourceMapLocationMappings
-