Class RewindableTokenStream
- java.lang.Object
-
- org.apache.manifoldcf.scriptengine.RewindableTokenStream
-
- All Implemented Interfaces:
TokenStream
public class RewindableTokenStream extends java.lang.Object implements TokenStream
Allows a TokenStream to be repeated as long as a sequence start is kept.
-
-
Field Summary
Fields Modifier and Type Field Description protected intcommittedSizeprotected intcurrentIndexprotected java.util.List<Token>historyprotected TokenStreamparent
-
Constructor Summary
Constructors Constructor Description RewindableTokenStream(TokenStream parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tokenpeek()Examine the current token.voidreset()voidskip()Skip the current token.
-
-
-
Field Detail
-
parent
protected TokenStream parent
-
history
protected java.util.List<Token> history
-
currentIndex
protected int currentIndex
-
committedSize
protected int committedSize
-
-
Constructor Detail
-
RewindableTokenStream
public RewindableTokenStream(TokenStream parent)
-
-
Method Detail
-
peek
public Token peek() throws ScriptException
Description copied from interface:TokenStreamExamine the current token.- Specified by:
peekin interfaceTokenStream- Throws:
ScriptException
-
skip
public void skip()
Description copied from interface:TokenStreamSkip the current token.- Specified by:
skipin interfaceTokenStream
-
reset
public void reset()
-
-