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

Member predicate LocalVariableDeclExpr::getInit

Gets the initializer expression of this local variable declaration expression, if any.

Note this applies specifically to a syntactic initialization like T varname = init; to include also e instanceof T varname and switch(e) ... case T varname, which both have the effect of initializing varname to a known local expression without using that syntax, use getInitOrPatternSource.

Expr getInit()