|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jett.parser.StyleScanner
public class StyleScanner
A StyleScanner scans CSS text and returns tokens.
| Nested Class Summary | |
|---|---|
static class |
StyleScanner.Token
Enumeration for the different types of Tokens in "CSS". |
| Constructor Summary | |
|---|---|
StyleScanner()
Construct a StyleScanner object, with empty input. |
|
StyleScanner(java.lang.String cssText)
Construct a StyleScanner object, with the given input. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCurrLexeme()
Returns the current lexeme after a call to getNextToken. |
int |
getNextPosition()
Returns the current position of the next token. |
StyleScanner.Token |
getNextToken()
Returns the Token. |
void |
reset()
Resets the scanner to the beginning of the CSS text. |
void |
setCssText(java.lang.String cssText)
Give the StyleScanner another CSS text to scan. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StyleScanner()
StyleScanner object, with empty input.
public StyleScanner(java.lang.String cssText)
StyleScanner object, with the given input.
cssText - The CSS text to scan.| Method Detail |
|---|
public StyleScanner.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 setCssText(java.lang.String cssText)
StyleScanner another CSS text to scan.
Resets to the beginning of the string.
cssText - The css Text to scan.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||