Package net.sourceforge.pmd.lang.vm.util
Class VelocityCharStream
- java.lang.Object
-
- net.sourceforge.pmd.lang.vm.util.VelocityCharStream
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.CharStream
public final class VelocityCharStream extends java.lang.Object implements net.sourceforge.pmd.lang.ast.CharStreamAn 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 intbufposstatic booleanSTATIC_FLAG
-
Constructor Summary
Constructors Constructor Description VelocityCharStream(java.io.InputStream dstream, int startline, int startcolumn)VelocityCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)VelocityCharStream(java.io.Reader dstream, int startline, int startcolumn)VelocityCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadjustBeginLineColumn(int newLine, int newCol)Method to adjust line and column numbers for the start of a token.voidbackup(int amount)charBeginToken()voidDone()intgetBeginColumn()intgetBeginLine()intgetColumn()Deprecated.intgetEndColumn()intgetEndLine()java.lang.StringGetImage()intgetLine()Deprecated.char[]GetSuffix(int len)charreadChar()voidreInit(java.io.InputStream dstream, int startline, int startcolumn)voidreInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)voidreInit(java.io.Reader dstream, int startline, int startcolumn)voidreInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
-
-
-
Field Detail
-
STATIC_FLAG
public static final boolean STATIC_FLAG
- See Also:
- Constant Field Values
-
bufpos
public int bufpos
-
-
Constructor Detail
-
VelocityCharStream
public VelocityCharStream(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)- Parameters:
dstream-startline-startcolumn-buffersize-
-
VelocityCharStream
public VelocityCharStream(java.io.InputStream dstream, int startline, int startcolumn)- Parameters:
dstream-startline-startcolumn-
-
VelocityCharStream
public VelocityCharStream(java.io.Reader dstream, int startline, int startcolumn, int buffersize)- Parameters:
dstream-startline-startcolumn-buffersize-
-
VelocityCharStream
public VelocityCharStream(java.io.Reader dstream, int startline, int startcolumn)- Parameters:
dstream-startline-startcolumn-
-
-
Method Detail
-
BeginToken
public char BeginToken() throws java.io.IOException- Specified by:
BeginTokenin interfacenet.sourceforge.pmd.lang.ast.CharStream- Throws:
java.io.IOException
-
readChar
public char readChar() throws java.io.IOException- Specified by:
readCharin interfacenet.sourceforge.pmd.lang.ast.CharStream- Throws:
java.io.IOException
-
getColumn
@Deprecated public int getColumn()
Deprecated.- Specified by:
getColumnin interfacenet.sourceforge.pmd.lang.ast.CharStream
-
getLine
@Deprecated public int getLine()
Deprecated.- Specified by:
getLinein interfacenet.sourceforge.pmd.lang.ast.CharStream
-
getEndColumn
public int getEndColumn()
- Specified by:
getEndColumnin interfacenet.sourceforge.pmd.lang.ast.CharStream
-
getEndLine
public int getEndLine()
- Specified by:
getEndLinein interfacenet.sourceforge.pmd.lang.ast.CharStream
-
getBeginColumn
public int getBeginColumn()
- Specified by:
getBeginColumnin interfacenet.sourceforge.pmd.lang.ast.CharStream
-
getBeginLine
public int getBeginLine()
- Specified by:
getBeginLinein interfacenet.sourceforge.pmd.lang.ast.CharStream
-
backup
public void backup(int amount)
- Specified by:
backupin interfacenet.sourceforge.pmd.lang.ast.CharStream
-
reInit
public void reInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)- Parameters:
dstream-startline-startcolumn-buffersize-
-
reInit
public void reInit(java.io.Reader dstream, int startline, int startcolumn)- Parameters:
dstream-startline-startcolumn-
-
reInit
public void reInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize)- Parameters:
dstream-startline-startcolumn-buffersize-
-
reInit
public void reInit(java.io.InputStream dstream, int startline, int startcolumn)- Parameters:
dstream-startline-startcolumn-
-
GetImage
public java.lang.String GetImage()
- Specified by:
GetImagein interfacenet.sourceforge.pmd.lang.ast.CharStream
-
GetSuffix
public char[] GetSuffix(int len)
- Specified by:
GetSuffixin interfacenet.sourceforge.pmd.lang.ast.CharStream
-
Done
public void Done()
- Specified by:
Donein interfacenet.sourceforge.pmd.lang.ast.CharStream
-
adjustBeginLineColumn
public void adjustBeginLineColumn(int newLine, int newCol)Method to adjust line and column numbers for the start of a token.- Parameters:
newLine-newCol-
-
-