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

Module Guards

Provides classes and predicates for reasoning about guards and the control flow elements controlled by those guards.

Import path

import semmle.code.java.controlflow.Guards

Imports

java

Provides all default Java QL imports.

Predicates

guardControls_v1

INTERNAL: Use Guards.controls instead.

guardControls_v2

INTERNAL: Use Guards.controls instead.

Classes

ConditionBlock

A basic block that terminates in a condition, splitting the subsequent control flow.

Guard

A condition that can be evaluated to either true or false. This can either be an Expr of boolean type that isn’t a boolean literal, or a case of a switch statement, or a method access that acts as a precondition check.