Package net.sourceforge.pmd.lang.ast
Class SimpleCharStream
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.SimpleCharStream
-
- All Implemented Interfaces:
CharStream
@Deprecated @InternalApi public class SimpleCharStream extends Object implements CharStream
Deprecated.An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]bufcolumnDeprecated.protected char[]bufferDeprecated.protected int[]buflineDeprecated.intbufposDeprecated.Position in buffer.protected intcolumnDeprecated.protected intinBufDeprecated.protected ReaderinputStreamDeprecated.protected intlineDeprecated.protected intmaxNextCharIndDeprecated.protected booleanprevCharIsCRDeprecated.protected booleanprevCharIsLFDeprecated.static booleanstaticFlagDeprecated.Whether parser is static.protected inttabSizeDeprecated.
-
Constructor Summary
Constructors Constructor Description SimpleCharStream(InputStream dstream)Deprecated.Constructor.SimpleCharStream(InputStream dstream, int startline, int startcolumn)Deprecated.Constructor.SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)Deprecated.Constructor.SimpleCharStream(InputStream dstream, String encoding)Deprecated.Constructor.SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)Deprecated.Constructor.SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)Deprecated.Constructor.SimpleCharStream(Reader dstream)Deprecated.Constructor.SimpleCharStream(Reader dstream, int startline, int startcolumn)Deprecated.Constructor.SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadjustBeginLineColumn(int newLine, int newCol)Deprecated.Method to adjust line and column numbers for the start of a token.voidbackup(int amount)Deprecated.Backup a number of characters.charBeginToken()Deprecated.Start.voidDone()Deprecated.Reset buffer when finished.protected voidExpandBuff(boolean wrapAround)Deprecated.protected voidFillBuff()Deprecated.intgetBeginColumn()Deprecated.Get token beginning column number.intgetBeginLine()Deprecated.Get token beginning line number.intgetColumn()Deprecated.intgetEndColumn()Deprecated.Get token end column number.intgetEndLine()Deprecated.Get token end line number.StringGetImage()Deprecated.Get token literal value.intgetLine()Deprecated.char[]GetSuffix(int len)Deprecated.Get the suffix.protected intgetTabSize(int i)Deprecated.charreadChar()Deprecated.Read a character.voidReInit(InputStream dstream)Deprecated.Reinitialise.voidReInit(InputStream dstream, int startline, int startcolumn)Deprecated.Reinitialise.voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize)Deprecated.Reinitialise.voidReInit(InputStream dstream, String encoding)Deprecated.Reinitialise.voidReInit(InputStream dstream, String encoding, int startline, int startcolumn)Deprecated.Reinitialise.voidReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)Deprecated.Reinitialise.voidReInit(Reader dstream)Deprecated.Reinitialise.voidReInit(Reader dstream, int startline, int startcolumn)Deprecated.Reinitialise.voidReInit(Reader dstream, int startline, int startcolumn, int buffersize)Deprecated.Reinitialise.protected voidsetTabSize(int i)Deprecated.protected voidUpdateLineColumn(char c)Deprecated.
-
-
-
Field Detail
-
staticFlag
public static final boolean staticFlag
Deprecated.Whether parser is static.- See Also:
- Constant Field Values
-
bufpos
public int bufpos
Deprecated.Position in buffer.
-
bufline
protected int[] bufline
Deprecated.
-
bufcolumn
protected int[] bufcolumn
Deprecated.
-
column
protected int column
Deprecated.
-
line
protected int line
Deprecated.
-
prevCharIsCR
protected boolean prevCharIsCR
Deprecated.
-
prevCharIsLF
protected boolean prevCharIsLF
Deprecated.
-
inputStream
protected Reader inputStream
Deprecated.
-
buffer
protected char[] buffer
Deprecated.
-
maxNextCharInd
protected int maxNextCharInd
Deprecated.
-
inBuf
protected int inBuf
Deprecated.
-
tabSize
protected int tabSize
Deprecated.
-
-
Constructor Detail
-
SimpleCharStream
public SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Deprecated.Constructor.
-
SimpleCharStream
public SimpleCharStream(Reader dstream, int startline, int startcolumn)
Deprecated.Constructor.
-
SimpleCharStream
public SimpleCharStream(Reader dstream)
Deprecated.Constructor.
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException
Deprecated.Constructor.- Throws:
UnsupportedEncodingException
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Deprecated.Constructor.
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
Deprecated.Constructor.- Throws:
UnsupportedEncodingException
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, int startline, int startcolumn)
Deprecated.Constructor.
-
SimpleCharStream
public SimpleCharStream(InputStream dstream, String encoding) throws UnsupportedEncodingException
Deprecated.Constructor.- Throws:
UnsupportedEncodingException
-
SimpleCharStream
public SimpleCharStream(InputStream dstream)
Deprecated.Constructor.
-
-
Method Detail
-
setTabSize
protected void setTabSize(int i)
Deprecated.
-
getTabSize
protected int getTabSize(int i)
Deprecated.
-
ExpandBuff
protected void ExpandBuff(boolean wrapAround)
Deprecated.
-
FillBuff
protected void FillBuff() throws IOExceptionDeprecated.- Throws:
IOException
-
BeginToken
public char BeginToken() throws IOExceptionDeprecated.Start.- Specified by:
BeginTokenin interfaceCharStream- Throws:
IOException
-
UpdateLineColumn
protected void UpdateLineColumn(char c)
Deprecated.
-
readChar
public char readChar() throws IOExceptionDeprecated.Read a character.- Specified by:
readCharin interfaceCharStream- Throws:
IOException
-
getColumn
@Deprecated public int getColumn()
Deprecated.- Specified by:
getColumnin interfaceCharStream
-
getLine
@Deprecated public int getLine()
Deprecated.- Specified by:
getLinein interfaceCharStream
-
getEndColumn
public int getEndColumn()
Deprecated.Get token end column number.- Specified by:
getEndColumnin interfaceCharStream
-
getEndLine
public int getEndLine()
Deprecated.Get token end line number.- Specified by:
getEndLinein interfaceCharStream
-
getBeginColumn
public int getBeginColumn()
Deprecated.Get token beginning column number.- Specified by:
getBeginColumnin interfaceCharStream
-
getBeginLine
public int getBeginLine()
Deprecated.Get token beginning line number.- Specified by:
getBeginLinein interfaceCharStream
-
backup
public void backup(int amount)
Deprecated.Backup a number of characters.- Specified by:
backupin interfaceCharStream
-
ReInit
public void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
Deprecated.Reinitialise.
-
ReInit
public void ReInit(Reader dstream, int startline, int startcolumn)
Deprecated.Reinitialise.
-
ReInit
public void ReInit(Reader dstream)
Deprecated.Reinitialise.
-
ReInit
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException
Deprecated.Reinitialise.- Throws:
UnsupportedEncodingException
-
ReInit
public void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
Deprecated.Reinitialise.
-
ReInit
public void ReInit(InputStream dstream, String encoding) throws UnsupportedEncodingException
Deprecated.Reinitialise.- Throws:
UnsupportedEncodingException
-
ReInit
public void ReInit(InputStream dstream)
Deprecated.Reinitialise.
-
ReInit
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException
Deprecated.Reinitialise.- Throws:
UnsupportedEncodingException
-
ReInit
public void ReInit(InputStream dstream, int startline, int startcolumn)
Deprecated.Reinitialise.
-
GetImage
public String GetImage()
Deprecated.Get token literal value.- Specified by:
GetImagein interfaceCharStream
-
GetSuffix
public char[] GetSuffix(int len)
Deprecated.Get the suffix.- Specified by:
GetSuffixin interfaceCharStream
-
Done
public void Done()
Deprecated.Reset buffer when finished.- Specified by:
Donein interfaceCharStream
-
adjustBeginLineColumn
public void adjustBeginLineColumn(int newLine, int newCol)Deprecated.Method to adjust line and column numbers for the start of a token.
-
-