|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.debugging.sourcemap.SourceMapGeneratorV1
public class SourceMapGeneratorV1
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
Constructor Summary | |
---|---|
SourceMapGeneratorV1()
|
Method Summary | |
---|---|
void |
addMapping(String sourceName,
String symbolName,
FilePosition sourceStartPosition,
FilePosition startPosition,
FilePosition endPosition)
Adds a mapping for the given node. |
void |
appendIndexMapTo(Appendable out,
String name,
List<SourceMapSection> appSections)
Appends the index source map to the given buffer. |
void |
appendTo(Appendable out,
String name)
Appends the source map in LavaBug format to the given buffer. |
void |
reset()
Resets the source map for reuse for the generation of a new source file. |
void |
setStartingPosition(int offsetLine,
int offsetIndex)
Sets the source code that exists in the buffer to which the generated code is being generated. |
void |
setWrapperPrefix(String prefix)
Sets the prefix used for wrapping the generated source file before it is output. |
void |
validate(boolean validate)
Whether to perform additional validation on the source map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceMapGeneratorV1()
Method Detail |
---|
public void addMapping(String sourceName, @Nullable String symbolName, FilePosition sourceStartPosition, FilePosition startPosition, FilePosition endPosition)
addMapping
in interface SourceMapGenerator
startPosition
- 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 setWrapperPrefix(String prefix)
setWrapperPrefix
in interface SourceMapGenerator
prefix
- The prefix that is added before the generated source code.public void setStartingPosition(int offsetLine, int offsetIndex)
setStartingPosition
in interface SourceMapGenerator
offsetLine
- The index of the current line being printed.offsetIndex
- The column index of the current character being printed.public void reset()
reset
in interface SourceMapGenerator
public void appendTo(Appendable out, String name) throws IOException
appendTo
in interface SourceMapGenerator
out
- 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 validate(boolean validate)
SourceMapGenerator
validate
in interface SourceMapGenerator
public void appendIndexMapTo(Appendable out, String name, List<SourceMapSection> appSections)
SourceMapGenerator
appendIndexMapTo
in interface SourceMapGenerator
out
- The stream to which the map will be appended.name
- The name of the generated source file that this source map
represents.appSections
- An ordered list of map sections to include in the index.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |