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 null
public JavadocToken peek()
JavadocTokenStream
peek
in interface JavadocTokenStream
public JavadocToken lookahead(int k)
JavadocTokenStream
0
.lookahead
in interface JavadocTokenStream
k
- the token offsetpublic JavadocToken nextToken()
JavadocTokenStream
nextToken
in interface JavadocTokenStream
public void mark()
JavadocTokenStream
JavadocTokenStream.rewind()
invocation will restore the position.mark
in interface JavadocTokenStream
public void rewind()
JavadocTokenStream
marked
,
and discards the last marked position.rewind
in interface JavadocTokenStream
public void discard()
JavadocTokenStream
marked position
.discard
in interface JavadocTokenStream
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.