Package com.google.javascript.jscomp
Class SourceMap
- java.lang.Object
-
- com.google.javascript.jscomp.SourceMap
-
public final class SourceMap extends java.lang.Object
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.- See Also:
CodeConsumer
,CodeGenerator
,CodePrinter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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 formatsstatic interface
SourceMap.LocationMapping
Function that mape a "destination" location to use within the source map.static class
SourceMap.Mapping
Maintains a mapping from a given node to the position in the source code at which its generated form was placed.static class
SourceMap.PrefixLocationMapping
SimpleSourceMap.LocationMapping
that strips a prefix from a location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMapping(SourceMap.Mapping mapping)
void
addMapping(Node node, FilePosition outputStartPosition, FilePosition outputEndPosition)
void
addSourceFile(java.lang.String name, java.lang.String code)
void
appendTo(java.lang.Appendable out, java.lang.String name)
void
reset()
void
setPrefixMappings(java.util.List<? extends SourceMap.LocationMapping> sourceMapLocationMappings)
void
setSourceFileMapping(SourceFileMapping mapping)
void
setStartingPosition(int offsetLine, int offsetIndex)
void
setWrapperPrefix(java.lang.String prefix)
void
validate(boolean validate)
-
-
-
Method Detail
-
addMapping
public void addMapping(SourceMap.Mapping mapping)
-
addMapping
public void addMapping(Node node, FilePosition outputStartPosition, FilePosition outputEndPosition)
-
addSourceFile
public void addSourceFile(java.lang.String name, java.lang.String code)
-
appendTo
public void appendTo(java.lang.Appendable out, java.lang.String name) throws java.io.IOException
- Throws:
java.io.IOException
-
reset
public void reset()
-
setStartingPosition
public void setStartingPosition(int offsetLine, int offsetIndex)
-
setWrapperPrefix
public void setWrapperPrefix(java.lang.String prefix)
-
validate
public void validate(boolean validate)
-
setPrefixMappings
public void setPrefixMappings(java.util.List<? extends SourceMap.LocationMapping> sourceMapLocationMappings)
-
setSourceFileMapping
public void setSourceFileMapping(SourceFileMapping mapping)
-
-