public class DefaultJavadocTokenStream extends Object implements JavadocTokenStream
JavadocTokenStream.| Constructor and Description |
|---|
DefaultJavadocTokenStream(JavadocScanner scanner)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
discard()
Discards the last
marked position. |
JavadocToken |
lookahead(int k)
Looks ahead the token after the offset.
|
void |
mark()
Marks the current stream position.
|
JavadocToken |
nextToken()
Consumes the next token and returns it.
|
JavadocToken |
peek()
Returns the next token.
|
void |
rewind()
Restores the stream position to the last
marked,
and discards the last marked position. |
public DefaultJavadocTokenStream(JavadocScanner scanner)
scanner - the element scannerIllegalArgumentException - if the parameter is nullpublic JavadocToken peek()
JavadocTokenStreampeek in interface JavadocTokenStreampublic JavadocToken lookahead(int k)
JavadocTokenStream0.lookahead in interface JavadocTokenStreamk - the token offsetpublic JavadocToken nextToken()
JavadocTokenStreamnextToken in interface JavadocTokenStreampublic void mark()
JavadocTokenStreamJavadocTokenStream.rewind() invocation will restore the position.mark in interface JavadocTokenStreampublic void rewind()
JavadocTokenStreammarked,
and discards the last marked position.rewind in interface JavadocTokenStreampublic void discard()
JavadocTokenStreammarked position.discard in interface JavadocTokenStreamCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.