public class SourceMapConsumerV3 extends Object implements SourceMapConsumer, SourceMappingReversable
Modifier and Type | Class and Description |
---|---|
static interface |
SourceMapConsumerV3.EntryVisitor |
Constructor and Description |
---|
SourceMapConsumerV3() |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getExtensions()
Returns all extensions and their values (which can be any json value)
in a Map object.
|
Mapping.OriginalMapping |
getMappingForLine(int lineNumber,
int column)
Returns the original mapping for the line number and column position found
in the source map.
|
Collection<String> |
getOriginalSources() |
Collection<Mapping.OriginalMapping> |
getReverseMapping(String originalFile,
int line,
int column)
Given a source file, line, and column, return the reverse mapping (source --> target).
|
String |
getSourceRoot() |
void |
parse(com.google.gson.JsonObject sourceMapRoot)
Parses the given contents containing a source map.
|
void |
parse(com.google.gson.JsonObject sourceMapRoot,
SourceMapSupplier sectionSupplier)
Parses the given contents containing a source map.
|
void |
parse(String contents)
Parses the given contents containing a source map.
|
void |
parse(String contents,
SourceMapSupplier sectionSupplier)
Parses the given contents containing a source map.
|
void |
visitMappings(SourceMapConsumerV3.EntryVisitor visitor) |
public void parse(String contents) throws SourceMapParseException
parse
in interface SourceMapConsumer
SourceMapParseException
public void parse(String contents, SourceMapSupplier sectionSupplier) throws SourceMapParseException
SourceMapParseException
public void parse(com.google.gson.JsonObject sourceMapRoot) throws SourceMapParseException
SourceMapParseException
public void parse(com.google.gson.JsonObject sourceMapRoot, SourceMapSupplier sectionSupplier) throws SourceMapParseException
SourceMapParseException
public Mapping.OriginalMapping getMappingForLine(int lineNumber, int column)
SourceMapping
getMappingForLine
in interface SourceMapping
lineNumber
- The line number, with the first being '1'.column
- The column index, with the first being '1'.public Collection<String> getOriginalSources()
getOriginalSources
in interface SourceMappingReversable
public Collection<Mapping.OriginalMapping> getReverseMapping(String originalFile, int line, int column)
SourceMappingReversable
getReverseMapping
in interface SourceMappingReversable
originalFile
- the source fileline
- the source linecolumn
- the source columnpublic String getSourceRoot()
public Map<String,Object> getExtensions()
public void visitMappings(SourceMapConsumerV3.EntryVisitor visitor)
Copyright © 2009-2014 Google. All Rights Reserved.