|
jET |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--prv.doman.util.Token
The Token
class defines a token used by stream tokenizer.
Token contains a word and its type (integer value).
Tokenizer
Field Summary | |
static int |
TOKEN_EOF
Token type when a token is end-of-file. |
static int |
TOKEN_EOL
Token type when a token is end-of-line. |
static int |
TOKEN_NUMBER
Token type when a token is a number. |
static int |
TOKEN_WORD
Token type when a token is regular word. |
Constructor Summary | |
Token()
|
Method Summary | |
int |
getColumn()
Gets an offset from beginning of line to the first character of the token. |
int |
getLine()
Gets the line of source where the token resides. |
int |
getType()
Gets type of this token. |
java.lang.String |
getWord()
Gets a token's word. |
void |
setColumn(int offset)
Sets an offset for this token from beginning of line. |
void |
setLine(int line)
Sets the line number for this token. |
void |
setType(int type)
Sets the type of token. |
void |
setWord(java.lang.String word)
Sets a word tothe token. |
java.lang.String |
toString()
Gets string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TOKEN_EOL
public static final int TOKEN_WORD
public static final int TOKEN_NUMBER
public static final int TOKEN_EOF
Constructor Detail |
public Token()
Method Detail |
public java.lang.String getWord()
public void setWord(java.lang.String word)
public int getType()
public void setType(int type)
type
- Type of the token.public java.lang.String toString()
toString
in class java.lang.Object
public int getLine()
public void setLine(int line)
line
- Line number.public int getColumn()
public void setColumn(int offset)
offset
- Offset.
|
jET |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |