|
Compiler Tree API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LineMap
Provides methods to convert between character positions and line numbers for a compilation unit.
| Method Summary | |
|---|---|
long |
getColumnNumber(long pos)
Find the column for a character position. |
long |
getLineNumber(long pos)
Find the line containing a position; a line termination character is on the line it terminates. |
long |
getPosition(long line,
long column)
Find the position corresponding to a (line,column). |
long |
getStartPosition(long line)
Find the start position of a line. |
| Method Detail |
|---|
long getStartPosition(long line)
line - line number (beginning at 1)
IndexOutOfBoundsException - if lineNumber < 1
if lineNumber > no. of lines
long getPosition(long line,
long column)
line - line number (beginning at 1)column - tab-expanded column number (beginning 1)
IndexOutOfBoundsException - if line < 1
if line > no. of lineslong getLineNumber(long pos)
pos - character offset of the position
long getColumnNumber(long pos)
pos - character offset of the position
|
Compiler Tree API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||