| com.sun.source.tree.LineMap
LineMap | public interface LineMap (Code) | | Provides methods to convert between character positions and line numbers
for a compilation unit.
since: 1.6 |
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).
Parameters: line - line number (beginning at 1) Parameters: column - tab-expanded column number (beginning 1) position of character throws: IndexOutOfBoundsException - if line < 1 if line > no. | long | getStartPosition(long line) Find the start position of a line.
Parameters: line - line number (beginning at 1) position of first character in line throws: IndexOutOfBoundsException - if lineNumber < 1if lineNumber > no. |
getColumnNumber | long getColumnNumber(long pos)(Code) | | Find the column for a character position.
Tab characters preceding the position on the same line
will be expanded when calculating the column number.
Parameters: pos - character offset of the position the tab-expanded column number of pos (first column is 1) |
getLineNumber | long getLineNumber(long pos)(Code) | | Find the line containing a position; a line termination
character is on the line it terminates.
Parameters: pos - character offset of the position the line number of pos (first line is 1) |
getPosition | long getPosition(long line, long column)(Code) | | Find the position corresponding to a (line,column).
Parameters: line - line number (beginning at 1) Parameters: column - tab-expanded column number (beginning 1) position of character throws: IndexOutOfBoundsException - if line < 1 if line > no. of lines |
getStartPosition | long getStartPosition(long line)(Code) | | Find the start position of a line.
Parameters: line - line number (beginning at 1) position of first character in line throws: IndexOutOfBoundsException - if lineNumber < 1if lineNumber > no. of lines |
|
|