Package edu.umd.cs.findbugs
Class Token
java.lang.Object
edu.umd.cs.findbugs.Token
Simple token class.
- Author:
- David Hovemeyer
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EOF
public static final int EOFEnd of file.- See Also:
-
EOL
public static final int EOLEnd of line.- See Also:
-
WORD
public static final int WORDAn ordinary word, number, etc.- See Also:
-
STRING
public static final int STRINGA string or character literal.- See Also:
-
SINGLE
public static final int SINGLEA single character token.- See Also:
-
COMMENT
public static final int COMMENTA comment.- See Also:
-
-
Constructor Details
-
Token
Constructor.- Parameters:
kind
- the kind of tokenlexeme
- the text value of the token
-
Token
public Token(int kind) Constructor when there is no text. E.g., EOF and EOL.- Parameters:
kind
- the kind of token
-
-
Method Details
-
getKind
public int getKind()Get the kind of token. -
getLexeme
Get the text value of the token.
-