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[]
bufcolumn
Deprecated.protected char[]
buffer
Deprecated.protected int[]
bufline
Deprecated.int
bufpos
Deprecated.Position in buffer.protected int
column
Deprecated.protected int
inBuf
Deprecated.protected Reader
inputStream
Deprecated.protected int
line
Deprecated.protected int
maxNextCharInd
Deprecated.protected boolean
prevCharIsCR
Deprecated.protected boolean
prevCharIsLF
Deprecated.static boolean
staticFlag
Deprecated.Whether parser is static.protected int
tabSize
Deprecated.
-
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 void
adjustBeginLineColumn(int newLine, int newCol)
Deprecated.Method to adjust line and column numbers for the start of a token.void
backup(int amount)
Deprecated.Backup a number of characters.char
BeginToken()
Deprecated.Start.void
Done()
Deprecated.Reset buffer when finished.protected void
ExpandBuff(boolean wrapAround)
Deprecated.protected void
FillBuff()
Deprecated.int
getBeginColumn()
Deprecated.Get token beginning column number.int
getBeginLine()
Deprecated.Get token beginning line number.int
getColumn()
Deprecated.int
getEndColumn()
Deprecated.Get token end column number.int
getEndLine()
Deprecated.Get token end line number.String
GetImage()
Deprecated.Get token literal value.int
getLine()
Deprecated.char[]
GetSuffix(int len)
Deprecated.Get the suffix.protected int
getTabSize(int i)
Deprecated.char
readChar()
Deprecated.Read a character.void
ReInit(InputStream dstream)
Deprecated.Reinitialise.void
ReInit(InputStream dstream, int startline, int startcolumn)
Deprecated.Reinitialise.void
ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
Deprecated.Reinitialise.void
ReInit(InputStream dstream, String encoding)
Deprecated.Reinitialise.void
ReInit(InputStream dstream, String encoding, int startline, int startcolumn)
Deprecated.Reinitialise.void
ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Deprecated.Reinitialise.void
ReInit(Reader dstream)
Deprecated.Reinitialise.void
ReInit(Reader dstream, int startline, int startcolumn)
Deprecated.Reinitialise.void
ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
Deprecated.Reinitialise.protected void
setTabSize(int i)
Deprecated.protected void
UpdateLineColumn(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 IOException
Deprecated.- Throws:
IOException
-
BeginToken
public char BeginToken() throws IOException
Deprecated.Start.- Specified by:
BeginToken
in interfaceCharStream
- Throws:
IOException
-
UpdateLineColumn
protected void UpdateLineColumn(char c)
Deprecated.
-
readChar
public char readChar() throws IOException
Deprecated.Read a character.- Specified by:
readChar
in interfaceCharStream
- Throws:
IOException
-
getColumn
@Deprecated public int getColumn()
Deprecated.- Specified by:
getColumn
in interfaceCharStream
-
getLine
@Deprecated public int getLine()
Deprecated.- Specified by:
getLine
in interfaceCharStream
-
getEndColumn
public int getEndColumn()
Deprecated.Get token end column number.- Specified by:
getEndColumn
in interfaceCharStream
-
getEndLine
public int getEndLine()
Deprecated.Get token end line number.- Specified by:
getEndLine
in interfaceCharStream
-
getBeginColumn
public int getBeginColumn()
Deprecated.Get token beginning column number.- Specified by:
getBeginColumn
in interfaceCharStream
-
getBeginLine
public int getBeginLine()
Deprecated.Get token beginning line number.- Specified by:
getBeginLine
in interfaceCharStream
-
backup
public void backup(int amount)
Deprecated.Backup a number of characters.- Specified by:
backup
in 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:
GetImage
in interfaceCharStream
-
GetSuffix
public char[] GetSuffix(int len)
Deprecated.Get the suffix.- Specified by:
GetSuffix
in interfaceCharStream
-
Done
public void Done()
Deprecated.Reset buffer when finished.- Specified by:
Done
in interfaceCharStream
-
adjustBeginLineColumn
public void adjustBeginLineColumn(int newLine, int newCol)
Deprecated.Method to adjust line and column numbers for the start of a token.
-
-