public interface StaticSourceFile
StaticSourceFile
contains information about a compiler input.Modifier and Type | Interface and Description |
---|---|
static class |
StaticSourceFile.SourceKind
Source kinds.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnOfOffset(int offset)
Gets the 0-based column number of the given source offset.
|
StaticSourceFile.SourceKind |
getKind()
The source kind.
|
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.
|
default boolean |
isExtern()
Whether the source kind is EXTERN.
|
default boolean |
isStrong()
Whether the source kind is STRONG.
|
default boolean |
isWeak()
Whether the source kind is WEAK.
|
java.lang.String getName()
StaticSourceFile.SourceKind getKind()
default boolean isStrong()
default boolean isWeak()
default 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-2020 Google. All Rights Reserved.