public interface StaticSourceFile
StaticSourceFile
contains information about a compiler input.Modifier and Type | Method and Description |
---|---|
int |
getColumnOfOffset(int offset)
Gets the 0-based column number of the given source offset.
|
int |
getLineOffset(int lineNumber)
Returns the offset of the given line number relative to the file start.
|
int |
getLineOfOffset(int offset)
Gets the 1-based line number of the given source offset.
|
java.lang.String |
getName()
The name of the file.
|
boolean |
isExtern()
Returns whether this is an externs file.
|
java.lang.String getName()
boolean isExtern()
int getLineOffset(int lineNumber)
lineNumber
- the line of the input to get the absolute offset of.java.lang.IllegalArgumentException
- if lineno is less than 1 or greater than
the number of lines in the source.int getLineOfOffset(int offset)
offset
- An absolute file offset.int getColumnOfOffset(int offset)
offset
- An absolute file offset.Copyright © 2009-2017 Google. All Rights Reserved.