|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.channel.CodeBuffer
public class CodeBuffer
The CodeBuffer class provides all the basic features required to manipulate a source code character stream. Those features are :
Nested Class Summary | |
---|---|
class |
CodeBuffer.Cursor
|
Constructor Summary | |
---|---|
protected |
CodeBuffer(Reader initialCodeReader,
CodeReaderConfiguration configuration)
Note that this constructor will read everything from reader and will close it. |
protected |
CodeBuffer(String code,
CodeReaderConfiguration configuration)
|
Method Summary | |
---|---|
char |
charAt(int index)
Returns the character at the specified index after the cursor without consuming it |
void |
close()
Deprecated. in 2.12, do not use anymore. |
int |
getColumnPosition()
|
CodeBuffer.Cursor |
getCursor()
|
int |
getLinePosition()
|
protected int |
intAt(int index)
|
int |
lastChar()
Looks at the last consumed character |
int |
length()
Returns the relative length of the string (i.e. |
int |
peek()
Looks at the next character without consuming it |
int |
pop()
Read and consume the next character |
CodeBuffer |
setColumnPosition(int cp)
Overrides the current column position |
void |
setLinePosition(int lp)
Overrides the current line position |
void |
startRecording()
|
CharSequence |
stopRecording()
|
CharSequence |
subSequence(int start,
int end)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected CodeBuffer(String code, CodeReaderConfiguration configuration)
protected CodeBuffer(Reader initialCodeReader, CodeReaderConfiguration configuration)
Method Detail |
---|
public final int pop()
public final int lastChar()
public final int peek()
@Deprecated public final void close()
public final int getLinePosition()
public final CodeBuffer.Cursor getCursor()
public final int getColumnPosition()
public final CodeBuffer setColumnPosition(int cp)
public final void setLinePosition(int lp)
public final void startRecording()
public final CharSequence stopRecording()
public final char charAt(int index)
charAt
in interface CharSequence
index
- the relative index of the character to be returned
CharSequence.charAt(int)
protected final int intAt(int index)
public final int length()
length
in interface CharSequence
public final CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public final String toString()
toString
in interface CharSequence
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |