|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.umlv.tatoo.runtime.buffer.impl.LocationTracker
public class LocationTracker
A class that is able to map buffer position to text location.
Constructor Summary | |
---|---|
LocationTracker()
Creates a location tracker. |
Method Summary | |
---|---|
void |
bufferClear()
Set the current and unwinded location to zero. |
void |
bufferDiscard()
|
void |
bufferNext(int character)
Update the columnNumber and lineNumber location. |
void |
bufferReset()
Update the unwinded location. |
void |
bufferRestart()
|
void |
bufferUnwind(int count)
Update the current and unwinded location. |
int |
getColumnNumber()
Returns the current column number in the stream. |
int |
getLineNumber()
Returns the current line number in the stream. |
int |
getUnwindedColumnNumber()
Returns the column number of the last unwind operation. |
int |
getUnwindedLineNumber()
Returns the line number of the last unwind operation. |
void |
setColumnNumber(int columnNumber)
Changes the current column number. |
void |
setLineNumber(int lineNumber)
Changes the current line number. |
void |
setUnwindedColumnNumber(int unwindedColumnNumber)
Changes the column number of the last unwind operation. |
void |
setUnwindedLineNumber(int unwindedLineNumber)
Changes the line number of the last unwind operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocationTracker()
Method Detail |
---|
public void bufferNext(int character)
LexerBuffer.next()
of a buffer to update line and column of the current tracker.
character
- the current character of the buffer.LexerBuffer.next()
public void bufferUnwind(int count)
LexerBuffer.unwind(int)
of a buffer to update line and column of the current tracker.
count
- the number of characters to unwindLexerBuffer.unwind(int)
public void bufferReset()
LexerBuffer.reset()
of a buffer to update line and column of the current tracker.
LexerBuffer.reset()
public void bufferClear()
public int getColumnNumber()
getColumnNumber
in interface LocationProvider
public void setColumnNumber(int columnNumber)
columnNumber
- the new value.public int getLineNumber()
getLineNumber
in interface LocationProvider
public void setLineNumber(int lineNumber)
lineNumber
- the new line numberpublic int getUnwindedColumnNumber()
getUnwindedColumnNumber
in interface LocationProvider
public void setUnwindedColumnNumber(int unwindedColumnNumber)
unwindedColumnNumber
- the new column number.public int getUnwindedLineNumber()
getUnwindedLineNumber
in interface LocationProvider
public void setUnwindedLineNumber(int unwindedLineNumber)
unwindedLineNumber
- the new line number.public void bufferRestart()
public void bufferDiscard()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |