Package edu.umd.cs.findbugs
Class Token
java.lang.Object
edu.umd.cs.findbugs.Token
Simple token class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A comment.static final int
End of file.static final int
End of line.private final int
private final String
static final int
A single character token.static final int
A string or character literal.static final int
An ordinary word, number, etc. -
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:
-
kind
private final int kind -
lexeme
-
-
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.
-