|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.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 |
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. |
void |
clear()
Set the current and unwinded location to zero. |
int |
getColumnNumber()
Returns the current column number in the stream. |
int |
getDiscardedColumnNumber()
|
int |
getDiscardedLineNumber()
|
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 |
setDiscardedColumnNumber(int discardedColumnNumber)
|
void |
setDiscardedLineNumber(int discardedLineNumber)
|
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 clear()
public int getColumnNumber()
getColumnNumber in interface LocationProviderpublic void setColumnNumber(int columnNumber)
columnNumber - the new value.public int getLineNumber()
getLineNumber in interface LocationProviderpublic void setLineNumber(int lineNumber)
lineNumber - the new line numberpublic int getUnwindedColumnNumber()
getUnwindedColumnNumber in interface LocationProviderpublic void setUnwindedColumnNumber(int unwindedColumnNumber)
unwindedColumnNumber - the new column number.public int getUnwindedLineNumber()
getUnwindedLineNumber in interface LocationProviderpublic void setUnwindedLineNumber(int unwindedLineNumber)
unwindedLineNumber - the new line number.public int getDiscardedColumnNumber()
public int getDiscardedLineNumber()
public void setDiscardedColumnNumber(int discardedColumnNumber)
public void setDiscardedLineNumber(int discardedLineNumber)
public void bufferRestart()
public void bufferDiscard()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||