Package com.google.javascript.jscomp
Interface SourceExcerptProvider
- All Known Implementing Classes:
- AbstractCompiler,- Compiler,- SimpleSourceExcerptProvider
public interface SourceExcerptProvider
A source excerpt provider is responsible for building source code excerpt
 of specific locations, such as a specific line or a region around a
 given line number.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA excerpt formatter is responsible of formatting source excerpts.static enumSource excerpt variety.
- 
Method SummaryModifier and TypeMethodDescriptiongetSourceLine(String sourceName, int lineNumber) Get the line indicated by the line number.getSourceRegion(String sourceName, int lineNumber) Get a region around the indicated line number.
- 
Method Details- 
getSourceLineGet the line indicated by the line number. This call will return only the specific line.- Parameters:
- lineNumber- the line number, 1 being the first line of the file
- Returns:
- the line indicated, or nullif it does not exist
 
- 
getSourceRegionGet a region around the indicated line number. The exact definition of a region is implementation specific, but it must contain the line indicated by the line number. A region must not start or end by a carriage return.- Parameters:
- lineNumber- the line number, 1 being the first line of the file
- Returns:
- the region around the line number indicated, or null if it does not exist
 
 
-