CodeQL library for Java

Member predicate Literal::getLiteral

Gets a string representation of this literal as it appeared 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()