|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.debugging.sourcemap.SourceMapGeneratorV2
public class SourceMapGeneratorV2
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
| Nested Class Summary | |
|---|---|
static class |
SourceMapGeneratorV2.LineMapDecoder
A line mapping decoder class used for testing and validation. |
static class |
SourceMapGeneratorV2.LineMapEncoder
|
| Nested classes/interfaces inherited from interface com.google.debugging.sourcemap.SourceMapGenerator |
|---|
SourceMapGenerator.Format |
| Constructor Summary | |
|---|---|
SourceMapGeneratorV2()
|
|
| Method Summary | |
|---|---|
void |
addMapping(String sourceName,
String symbolName,
FilePosition sourceStartPosition,
FilePosition startPosition,
FilePosition endPosition)
Adds a mapping for the given node. |
void |
appendTo(Appendable out,
String name)
Writes out the source map in the following format (line numbers are for reference only and are not part of the format): 1. |
void |
reset()
Resets the source map for reuse. |
void |
setStartingPosition(int offsetLine,
int offsetIndex)
Sets the source code that exists in the buffer for which the generated code is being generated. |
void |
setWrapperPrefix(String prefix)
Sets the prefix used for wrapping the generated source file before it is written. |
void |
validate(boolean validate)
Whether to perform additional validation on the source map. |
void |
writeMetaMap(Appendable out,
String name,
List<SourceMapSection> appSections)
To facilitate incremental compiles, create a source map that is built piecemeal from other source maps. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SourceMapGeneratorV2()
| Method Detail |
|---|
public void reset()
reset in interface SourceMapGeneratorpublic void validate(boolean validate)
SourceMapGenerator
validate in interface SourceMapGeneratorvalidate - Whether to perform (potentially costly) validation on the
generated source map.public void setWrapperPrefix(String prefix)
setWrapperPrefix in interface SourceMapGeneratorprefix - The prefix that is added before the generated source code.
public void setStartingPosition(int offsetLine,
int offsetIndex)
setStartingPosition in interface SourceMapGeneratoroffsetLine - The index of the current line being printed.offsetIndex - The column index of the current character being printed.
public void addMapping(String sourceName,
@Nullable
String symbolName,
FilePosition sourceStartPosition,
FilePosition startPosition,
FilePosition endPosition)
addMapping in interface SourceMapGeneratorstartPosition - The position on the starting lineendPosition - The position on the ending line.sourceName - The file name to use in the generate source map
to represent this source.symbolName - The symbol name associated with this position in the
source map.sourceStartPosition - The starting position in the original source for
represented range outputStartPosition to outputEndPosition in the
generated file.
public void appendTo(Appendable out,
String name)
throws IOException
appendTo in interface SourceMapGeneratorout - The stream to which the map will be appended.name - The name of the generated source file that this source map
represents.
IOException
public void writeMetaMap(Appendable out,
String name,
List<SourceMapSection> appSections)
throws IOException
writeMetaMap in interface SourceMapGeneratorIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||