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

Module java

Provides all default Java QL imports.

Import path

import java

Predicates

argumentToExec

Holds if e is an expression used as an argument to a call that executes an external command. For calls to varargs method calls, this only includes the first argument, which will be the command to be executed.

declaresMember

Holds if type t declares member m.

depends

Holds if type t depends on type dep.

dominanceFrontier

The dominance frontier relation for basic blocks.

dominates

Holds if dom dominates node. (This is reflexive.)

erasedHaveIntersection

Holds if there is a common (reflexive, transitive) subtype of the erased types t1 and t2.

hasDescendant

Holds if reference type anc is a direct or indirect supertype of sub, including itself.

hasName

Holds if element e has name name.

hasSubtype

Holds if reference type t is an immediate super-type of sub.

haveIntersection

Holds if there is a common (reflexive, transitive) subtype of the erasures of types t1 and t2.

iDominates

Immediate dominance relation on control-flow graph nodes.

javaxOrJakarta

Gets “java” or “jakarta”.

notHaveIntersection

Holds if there is no common (reflexive, transitive) subtype of the erasures of types t1 and t2.

overridesIgnoringAccess

Auxiliary predicate: whether method m1 overrides method m2, ignoring any access modifiers. Additionally, this predicate binds t1 to the type declaring m1 and t2 to the type declaring m2.

postDominates

Holds if dom post-dominates node. (This is reflexive.)

strictlyDominates

Holds if dom strictly dominates node.

strictlyPostDominates

Holds if dom strictly post-dominates node.

usesType

Bind the reference type dep to the source declaration of any types used to construct t, including (possibly nested) type parameters of parameterized types, element types of array types, and bounds of type variables or wildcards.

Classes

AddExpr

A binary expression using the + operator.

AfterAnnotation

An @org.junit.After annotation.

AfterClassAnnotation

An @org.junit.AfterClass annotation.

AndBitwiseExpr

A binary expression using the & operator.

AndLogicalExpr

A binary expression using the && operator.

Annotatable

An abstract representation of language elements that can be annotated.

AnnotatedGeneratedClass

A Java class annotated with a @Generated annotation.

Annotation

Any annotation used to annotate language elements with meta-information.

AnnotationElement

An annotation element is a member declared in an annotation type.

AnnotationType

An annotation type is a special kind of interface type declaration.

AnonymousClass

An anonymous class.

AntTarget

An XML element that represents an Ant target.

AntlrGenerated

A Java class generated by an ANTLR scanner or parser class.

Argument

An argument to a call.

ArgumentToExec

An expression used as an argument to a call that executes an external command. For calls to varargs method calls, this only includes the first argument, which will be the command to be executed.

Array

An array type.

ArrayAccess

An array access.

ArrayCreationExpr

An array creation expression.

ArrayInit

An array initializer consisting of an opening and closing curly bracket and optionally containing expressions (which themselves can be array initializers) representing the elements of the array. For example: { 'a', 'b' }.

ArrayLengthField

The length field of the array type.

ArrayTypeAccess

An array type access is a type access of the form String[].

AssertStmt

An assert statement.

AssignAddExpr

A compound assignment expression using the += operator.

AssignAndExpr

A compound assignment expression using the &= operator.

AssignDivExpr

A compound assignment expression using the /= operator.

AssignExpr

A simple assignment expression using the = operator.

AssignLeftShiftExpr