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

Module signature AstSig

Import path

import codeql.controlflow.ControlFlowGraph

Predicates

callableGetBody

Gets the body of callable c, if any.

callableGetParameter

Gets the indexth parameter of callable c.

fallsThrough

Holds if this case can fall through to the next case if it is not otherwise prevented with a break or similar.

getChild

Gets the child of AST node n at the specified index.

getEnclosingCallable

Gets the immediately enclosing callable that contains node.

getTryElse

Gets the else block of this try statement, if any.

getTryInit

Gets the initializer of this try statement at the specified (zero-based) position index, if any.

Types

AssignExpr

A simple assignment expression, for example x = y.

AssignLogicalAndExpr

A short-circuiting logical AND compound assignment expression.

AssignLogicalOrExpr

A short-circuiting logical OR compound assignment expression.

AssignNullCoalescingExpr

A short-circuiting null-coalescing compound assignment expression.

Assignment

An assignment expression, either compound or simple.

AstNode

An AST node.

BinaryExpr

A binary expression.

BlockStmt

A block statement, which is a sequence of statements that are executed in order.

BooleanLiteral

A boolean literal expression.

BreakStmt

A break statement.

Callable

A callable, for example a function, method, constructor, or top-level script.

Case

A case in a switch.

CatchClause

A catch clause in a try statement.

CompoundAssignment

A compound assignment expression, for example x += y or x ??= y.

ConditionalExpr

A ternary conditional expression.

ContinueStmt

A continue statement.

DefaultCase
DoStmt

A do-while loop statement.

Expr

An expression.

ExprStmt

An expression statement.

ForStmt

A traditional C-style for loop.

ForeachStmt

A for-loop that iterates over the elements of a collection.

GotoStmt

A goto statement.

IfStmt

An if statement.

LogicalAndExpr

A short-circuiting logical AND expression.

LogicalNotExpr

A logical NOT expression.

LogicalOrExpr

A short-circuiting logical OR expression.

LoopStmt

A loop statement. Loop statements are further subclassed into specific types of loops.

NullCoalescingExpr

A short-circuiting null-coalescing expression.

Parameter

A parameter of a callable.

PatternMatchExpr

A pattern matching expression.

ReturnStmt

A return statement.

Stmt

A statement.

Switch

A switch.

Throw

A throw statement or expression.

TryStmt

A try statement with catch and/or finally clauses.

UnaryExpr

A unary expression.

WhileStmt

A while loop statement.

Parameters

LocationLocationSig