CodeQL library for Java/Kotlin
codeql/java-all 9.3.0 (changelog, source)
Search

Member predicate VariableWrite::getValue

Gets the expression with the value being written, if any.

This can be the same expression as returned by asExpr(), which is the case for, for example, ++x and x += e. For simple assignments like x = e, asExpr() gets the whole assignment expression while getValue() gets the right-hand side e. Post-crement operations like x++ do not have an expression with the value being written.

Expr getValue()