This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Modifier and Type | Field and Description |
|---|---|
| protected char[] | buf
A temporary hard reference to the content of the file object. |
| protected int | bufLen
The length of the content. |
| protected JavaFileObject | fileObject
The underlying file object. |
| protected int | line
The line number of a line found by findLine. |
| protected int | lineStart
The start of a line found by findLine. |
| protected AbstractLog | log
A log for reporting errors, such as errors accessing the content. |
| public static final DiagnosticSource | |
| protected SoftReference | refBuf
A soft reference to the content of the file object. |
| Access | Constructor and Description |
|---|---|
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | findLine(int
Character offset into the buffer pos)Find the line in the buffer that contains the current position |
| public int | getColumnNumber(int pos, boolean expandTabs)
Return the one-based column number associated with a given pos for the current source file. |
| public JavaFileObject | |
| public String | |
| public int | getLineNumber(int pos)
Return the one-based line number associated with a given pos for the current source file. |
| protected char[] |
| buf | back to summary |
|---|---|
| protected char[] buf A temporary hard reference to the content of the file object. | |
| bufLen | back to summary |
|---|---|
| protected int bufLen The length of the content. | |
| fileObject | back to summary |
|---|---|
| protected JavaFileObject fileObject The underlying file object. | |
| line | back to summary |
|---|---|
| protected int line The line number of a line found by findLine. | |
| lineStart | back to summary |
|---|---|
| protected int lineStart The start of a line found by findLine. | |
| log | back to summary |
|---|---|
| protected AbstractLog log A log for reporting errors, such as errors accessing the content. | |
| NO_SOURCE | back to summary |
|---|---|
| public static final DiagnosticSource NO_SOURCE | |
| refBuf | back to summary |
|---|---|
| protected SoftReference<char[]> refBuf A soft reference to the content of the file object. | |
| DiagnosticSource | back to summary |
|---|---|
| public DiagnosticSource(JavaFileObject fo, AbstractLog log) | |
| DiagnosticSource | back to summary |
|---|---|
| private DiagnosticSource() | |
| findLine | back to summary |
|---|---|
| protected boolean findLine(int pos) Find the line in the buffer that contains the current position
| |
| getColumnNumber | back to summary |
|---|---|
| public int getColumnNumber(int pos, boolean expandTabs) Return the one-based column number associated with a given pos for the current source file. Zero is returned if no column exists for the given position. | |
| getFile | back to summary |
|---|---|
| public JavaFileObject getFile() Return the underlying file object handled by this DiagnosticSource object. | |
| getLine | back to summary |
|---|---|
| public String getLine(int pos) Return the content of the line containing a given pos. | |
| getLineNumber | back to summary |
|---|---|
| public int getLineNumber(int pos) Return the one-based line number associated with a given pos for the current source file. Zero is returned if no line exists for the given position. | |
| initBuf | back to summary |
|---|---|
| protected char[] initBuf(JavaFileObject fileObject) throws IOException | |