public class TagScanner
extends java.lang.Object
TagScanner
scans tag XML text and returns tokens.Modifier and Type | Class | Description |
---|---|---|
static class |
TagScanner.Token |
Enumeration for the different types of Tokens in Tags.
|
Constructor | Description |
---|---|
TagScanner() |
Construct a
TagScanner object, with empty input. |
TagScanner(java.lang.String tagText) |
Construct a
TagScanner object, with the given input. |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getCurrLexeme() |
Returns the current lexeme after a call to
getNextToken . |
int |
getNextPosition() |
Returns the current position of the next token.
|
TagScanner.Token |
getNextToken() |
Returns the
Token . |
void |
reset() |
Resets the scanner to the beginning of the tag text.
|
void |
setTagText(java.lang.String tagText) |
Give the
TagScanner another tag text to scan. |
public TagScanner()
TagScanner
object, with empty input.public TagScanner(java.lang.String tagText)
TagScanner
object, with the given input.tagText
- The tag text to scan.public TagScanner.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 int getNextPosition()
public void reset()
public void setTagText(java.lang.String tagText)
TagScanner
another tag text to scan.
Resets to the beginning of the string.tagText
- The tagText to scan.Copyright © 2012–2018 Jett Team. All rights reserved.