|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.util.Position.LineMapImpl
static class Position.LineMapImpl
| Field Summary | |
|---|---|
private int |
lastLine
|
private int |
lastPosition
|
protected int[] |
startPosition
|
| Constructor Summary | |
|---|---|
protected |
Position.LineMapImpl()
|
| Method Summary | |
|---|---|
protected void |
build(char[] src,
int max)
|
int |
getColumnNumber(int pos)
Find the column for a character position. |
long |
getColumnNumber(long pos)
Find the column for a character position. |
int |
getLineNumber(int pos)
Find the line containing a position; a line termination character is on the line it terminates. |
long |
getLineNumber(long pos)
Find the line containing a position; a line termination character is on the line it terminates. |
int |
getPosition(int line,
int column)
Find the position corresponding to a (line,column). |
long |
getPosition(long line,
long column)
Find the position corresponding to a (line,column). |
int |
getStartPosition(int line)
Find the start position of a line. |
long |
getStartPosition(long line)
Find the start position of a line. |
private static int |
longToInt(long longValue)
|
protected void |
setTabPosition(int offset)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] startPosition
private int lastPosition
private int lastLine
| Constructor Detail |
|---|
protected Position.LineMapImpl()
| Method Detail |
|---|
protected void build(char[] src,
int max)
public int getStartPosition(int line)
Position.LineMap
getStartPosition in interface Position.LineMapline - number of line (first is 1)
public long getStartPosition(long line)
LineMap
getStartPosition in interface LineMapline - line number (beginning at 1)
public int getPosition(int line,
int column)
Position.LineMap
getPosition in interface Position.LineMapline - number of line (first is 1)column - number of character on line (first is 1)
public long getPosition(long line,
long column)
LineMap
getPosition in interface LineMapline - line number (beginning at 1)column - tab-expanded column number (beginning 1)
public int getLineNumber(int pos)
Position.LineMap
getLineNumber in interface Position.LineMappos - character offset of the position
public long getLineNumber(long pos)
LineMap
getLineNumber in interface LineMappos - character offset of the position
public int getColumnNumber(int pos)
Position.LineMap
getColumnNumber in interface Position.LineMappos - character offset of the position
public long getColumnNumber(long pos)
LineMap
getColumnNumber in interface LineMappos - character offset of the position
private static int longToInt(long longValue)
protected void setTabPosition(int offset)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||