public interface SourceStream extends Snippetable
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(int length)
Read the specified amount of tokens and dispose result (it won't create snippet)
|
TokenInfo |
getCurrent()
Get current token
|
default int |
getCurrentLine()
Get current line
|
Snippet |
getOriginalSource()
Get original source used to create the stream
|
default int |
getReadLength()
Get the amount of read tokens
|
default int |
getUnreadLength()
Get the amount of unread tokens
|
boolean |
hasUnreadSource()
Check if the source has available content
|
TokenInfo |
read()
Read the next token
|
Snippet |
read(int length)
Read the specified amount of tokens
|
Snippet |
readLineResidue()
Read the rest of the current line
|
Snippet |
toSnippet()
Get current source as snippet
|
default SourceStream |
toStream()
Convert object to the source stream
|
TokenInfo read()
Snippet read(int length)
length - amount of tokens to readvoid dispose(int length)
Snippet readLineResidue()
boolean hasUnreadSource()
TokenInfo getCurrent()
Snippet getOriginalSource()
default int getCurrentLine()
default int getReadLength()
default int getUnreadLength()
Snippet toSnippet()
toSnippet in interface Snippetabledefault SourceStream toStream()
StreamabletoStream in interface SnippetabletoStream in interface StreamableCopyright © 2020. All rights reserved.