public class MetadataScanner
extends java.lang.Object
MetadataScanner
object scans metadata text and returns tokens.Modifier and Type | Class | Description |
---|---|---|
static class |
MetadataScanner.Token |
Enumeration for the different types of Tokens in Metadata.
|
Constructor | Description |
---|---|
MetadataScanner() |
Construct a
MetadataScanner object, with empty input. |
MetadataScanner(java.lang.String metadataText) |
Construct a
MetadataScanner object, with the given input. |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getCurrLexeme() |
Returns the current lexeme after a call to
getNextToken . |
MetadataScanner.Token |
getNextToken() |
Returns the
Token . |
void |
reset() |
Resets the scanner to the beginning of the metadata text.
|
void |
setMetadataText(java.lang.String metadataText) |
Give the
MetadataScanner another metadata text to scan. |
public MetadataScanner()
MetadataScanner
object, with empty input.public MetadataScanner(java.lang.String metadataText)
MetadataScanner
object, with the given input.metadataText
- The metadata text to scan.public MetadataScanner.Token getNextToken()
Token
. After this call completes, the current
lexeme is available via a call to getCurrLexeme
.
Starts looking at the current offset, and once the token is found, then
the offset is advanced to the start of the next token.Token
.getCurrLexeme()
public java.lang.String getCurrLexeme()
getNextToken
.null
if
getNextToken
hasn't been called yet after a reset.getNextToken()
,
reset()
public void reset()
public void setMetadataText(java.lang.String metadataText)
MetadataScanner
another metadata text to scan.
Resets to the beginning of the string.metadataText
- The metadata text to scan.Copyright © 2012–2018 Jett Team. All rights reserved.