public class SourceReader extends IndexReader
| Constructor and Description |
|---|
SourceReader() |
SourceReader(java.nio.ByteBuffer buffer,
int bufferEnd) |
SourceReader(java.io.File file) |
SourceReader(java.lang.String source) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bufferOk() |
int |
getBottomLevelPosition(int topLevelPosition) |
IndexReader |
getBottomLevelSource() |
java.nio.ByteBuffer |
getBuffer() |
int |
getBufferSize() |
int |
getCurLine() |
int |
getCurPrior() |
java.lang.String |
getFilename() |
int |
getIntervalEndPos() |
int |
getIntervalStartPos() |
int |
getPosition() |
int |
getReadStartPosition() |
java.lang.String |
intervalToString(int startShift,
int endShift) |
boolean |
isEndOfBuffer() |
boolean |
isReadFromFile() |
SourceReader |
newReader()
Clones this Reader without copying the buffer itself
|
Index |
read()
Returns the next index in the source code and moves the marker.
|
char |
readChar() |
void |
readStart() |
void |
rewind() |
void |
setCurPrior(int curPrior) |
void |
setIntervalEndPos(int endPos) |
void |
setIntervalStartPos(int startPos) |
void |
setPosition(int position)
Sets the Position of the inner Buffer.
|
void |
skipSpace() |
void |
stepBack()
Makes one step back in the buffer.
|
java.lang.String |
toString() |
SourcePosition |
toTextPosition(int position)
Returns the position of the readable input source code.
|
canStepBack, clear, getBottomLevelIntervalStartPos, getBottomLevelPosition, getErrorPosition, hasErrorPosition, intervalToString, parseStart, setErrorPosition, setIntervalPositions, switchParsergetMarkedStackSize, getResultStackSize, getStackMark, popResult, pushResult, resetStack, resultStackToString, setStackMarkpublic SourceReader()
public SourceReader(java.nio.ByteBuffer buffer,
int bufferEnd)
public SourceReader(java.lang.String source)
public SourceReader(java.io.File file)
public void rewind()
public int getCurLine()
public java.nio.ByteBuffer getBuffer()
public boolean bufferOk()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isEndOfBuffer()
isEndOfBuffer in interface ReaderInterfaceisEndOfBuffer in class IndexReaderpublic int getBufferSize()
getBufferSize in interface ReaderInterfacegetBufferSize in class IndexReaderpublic int getCurPrior()
public void setCurPrior(int curPrior)
public void readStart()
public int getReadStartPosition()
public int getPosition()
getPosition in interface ReaderInterfacegetPosition in class IndexReaderpublic void setPosition(int position)
IndexReadersetPosition in interface ReaderInterfacesetPosition in class IndexReaderposition - the position to set the markerpublic Index read()
ReaderInterfaceread in interface ReaderInterfaceread in class IndexReaderpublic void stepBack()
IndexReaderstepBack in class IndexReaderpublic SourceReader newReader()
IndexReadernewReader in class IndexReaderpublic java.lang.String intervalToString(int startShift,
int endShift)
intervalToString in class IndexReaderpublic final int getIntervalStartPos()
getIntervalStartPos in class IndexReaderpublic void setIntervalStartPos(int startPos)
setIntervalStartPos in class IndexReaderpublic final int getIntervalEndPos()
getIntervalEndPos in class IndexReaderpublic void setIntervalEndPos(int endPos)
setIntervalEndPos in class IndexReaderpublic char readChar()
public SourcePosition toTextPosition(int position)
ReaderInterfacetoTextPosition in interface ReaderInterfacetoTextPosition in class IndexReaderposition - the position to transform into the text positionpublic void skipSpace()
skipSpace in class IndexReaderpublic java.lang.String getFilename()
getFilename in interface ReaderInterfacegetFilename in class IndexReaderpublic boolean isReadFromFile()
public int getBottomLevelPosition(int topLevelPosition)
getBottomLevelPosition in class IndexReaderpublic IndexReader getBottomLevelSource()
getBottomLevelSource in class IndexReader