|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTokenStream
CheckingTokenStream
public class CheckingTokenStream
Used for debugging optimized FastTokenStream, this class checks the main TokenStream against a reference one for equality. Any difference is flagged with an assertion failure.
Field Summary | |
---|---|
private static String |
ACRONYM_TYPE
Token type for acronyms |
private static String |
APOSTROPHE_TYPE
Token type for words containing apostrophes |
(package private) TokenStream |
main
Main token stream that is being checked |
(package private) TokenStream |
ref
Reference stream to check the main one against |
Constructor Summary | |
---|---|
CheckingTokenStream(TokenStream main,
TokenStream ref)
Construct a CheckingTokenStream |
Method Summary | |
---|---|
void |
close()
Close the token stream |
private String |
idType(String type)
Map the type to apostrophe, acronym, or other |
Token |
next()
Get the next token from the main stream. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
TokenStream main
TokenStream ref
private static final String APOSTROPHE_TYPE
private static final String ACRONYM_TYPE
Constructor Detail |
---|
public CheckingTokenStream(TokenStream main, TokenStream ref)
Method Detail |
---|
public Token next() throws IOException
next
in class TokenStream
IOException
private String idType(String type)
public void close() throws IOException
close
in class TokenStream
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |