net.sourceforge.pmd.lang.vm.util
Class VelocityCharStream

java.lang.Object
  extended by net.sourceforge.pmd.lang.vm.util.VelocityCharStream
All Implemented Interfaces:
CharStream

public final class VelocityCharStream
extends Object
implements CharStream

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).


Field Summary
 int bufpos
           
static boolean STATIC_FLAG
           
 
Constructor Summary
VelocityCharStream(InputStream dstream, int startline, int startcolumn)
           
VelocityCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
           
VelocityCharStream(Reader dstream, int startline, int startcolumn)
           
VelocityCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
           
 
Method Summary
 void adjustBeginLineColumn(int newLine, int newCol)
          Method to adjust line and column numbers for the start of a token.
 void backup(int amount)
           
 char BeginToken()
           
 void Done()
           
 int getBeginColumn()
           
 int getBeginLine()
           
 int getColumn()
          Deprecated.  
 int getEndColumn()
           
 int getEndLine()
           
 String GetImage()
           
 int getLine()
          Deprecated.  
 char[] GetSuffix(int len)
           
 char readChar()
           
 void ReInit(InputStream dstream, int startline, int startcolumn)
           
 void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
           
 void ReInit(Reader dstream, int startline, int startcolumn)
           
 void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATIC_FLAG

public static final boolean STATIC_FLAG
See Also:
Constant Field Values

bufpos

public int bufpos
Constructor Detail

VelocityCharStream

public VelocityCharStream(Reader dstream,
                          int startline,
                          int startcolumn,
                          int buffersize)
Parameters:
dstream -
startline -
startcolumn -
buffersize -

VelocityCharStream

public VelocityCharStream(Reader dstream,
                          int startline,
                          int startcolumn)
Parameters:
dstream -
startline -
startcolumn -

VelocityCharStream

public VelocityCharStream(InputStream dstream,
                          int startline,
                          int startcolumn,
                          int buffersize)
Parameters:
dstream -
startline -
startcolumn -
buffersize -

VelocityCharStream

public VelocityCharStream(InputStream dstream,
                          int startline,
                          int startcolumn)
Parameters:
dstream -
startline -
startcolumn -
Method Detail

BeginToken

public char BeginToken()
                throws IOException
Specified by:
BeginToken in interface CharStream
Throws:
IOException
See Also:
org.apache.velocity.runtime.parser.CharStream#BeginToken()

readChar

public char readChar()
              throws IOException
Specified by:
readChar in interface CharStream
Throws:
IOException
See Also:
org.apache.velocity.runtime.parser.CharStream#readChar()

getColumn

public int getColumn()
Deprecated. 

Specified by:
getColumn in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#getColumn()

getLine

public int getLine()
Deprecated. 

Specified by:
getLine in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#getLine()

getEndColumn

public int getEndColumn()
Specified by:
getEndColumn in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#getEndColumn()

getEndLine

public int getEndLine()
Specified by:
getEndLine in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#getEndLine()

getBeginColumn

public int getBeginColumn()
Specified by:
getBeginColumn in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#getBeginColumn()

getBeginLine

public int getBeginLine()
Specified by:
getBeginLine in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#getBeginLine()

backup

public void backup(int amount)
Specified by:
backup in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#backup(int)

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Parameters:
dstream -
startline -
startcolumn -
buffersize -

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn)
Parameters:
dstream -
startline -
startcolumn -

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Parameters:
dstream -
startline -
startcolumn -
buffersize -

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn)
Parameters:
dstream -
startline -
startcolumn -

GetImage

public String GetImage()
Specified by:
GetImage in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#GetImage()

GetSuffix

public char[] GetSuffix(int len)
Specified by:
GetSuffix in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#GetSuffix(int)

Done

public void Done()
Specified by:
Done in interface CharStream
See Also:
org.apache.velocity.runtime.parser.CharStream#Done()

adjustBeginLineColumn

public void adjustBeginLineColumn(int newLine,
                                  int newCol)
Method to adjust line and column numbers for the start of a token.

Parameters:
newLine -
newCol -


Copyright © 2002–2015 InfoEther. All rights reserved.