public override classifyIdentifier( token as String, line as String, endIndex as Long, previousWord as String, inQueryBlock as Boolean ) as TokenKind
Classifies Java identifiers, promoting method names followed by ( after a type or modifier to TokenKind.DECLARATION_NAME or TokenKind.FUNCTION.
| Parameter | Description |
|---|---|
token | Identifier text. |
line | Full source line. |
endIndex | Exclusive end index of token in line. |
previousWord | Immediately preceding word on the line. |
inQueryBlock | Unused in Java (false). |
Resolved TokenKind.
import klyn.code
import klyn.code.java
t = JavaTokenizer()
assert t.classifyIdentifier("findById", "public User findById(long id)", 20, "User", false) == TokenKind.DECLARATION_NAME