CodeQL library for Java/Kotlin
codeql/java-all 1.1.2-dev (changelog, source)

Member predicate Literal::getLiteral

Gets a string representation of this literal as it appeared in the source code.

For Kotlin the result might not match the exact representation used in the source code.

Important: Unless a query explicitly wants to check how a literal was written in the source code, the predicate getValue() (or value predicates of subclasses) should be used instead. For example for the integer literal 0x7fff_ffff the result of getLiteral() would be 0x7fff_ffff, while the result of getValue() would be 2147483647.

string getLiteral()