|
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 lineslong 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 lines
long 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 |
Copyright 2010 Sun Microsystems, Inc. All rights reserved. Use is subject to the terms of the GNU General Public License.