CodeQL library for Java/Kotlin
codeql/java-all 9.0.4 (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.

bbDominates

DEPRECATED: Use BasicBlock::dominates instead.

bbIDominates

DEPRECATED: Use BasicBlock::immediatelyDominates instead.

bbIPostDominates

The immediate post-dominance relation on basic blocks.

bbPostDominates

DEPRECATED: Use BasicBlock::postDominates instead.

bbStrictlyDominates

DEPRECATED: Use BasicBlock::strictlyDominates instead.

bbStrictlyPostDominates

DEPRECATED: Use BasicBlock::strictlyPostDominates instead.

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

A compound assignment expression using the <<= operator.

AssignMulExpr

A compound assignment expression using the *= operator.

AssignOp

A common super-class to represent compound assignments, which include an implicit operator.

AssignOrExpr

A compound assignment expression using the |= operator.

AssignRemExpr

A compound assignment expression using the %= operator.

AssignRightShiftExpr

A compound assignment expression using the >>= operator.

AssignSubExpr

A compound assignment expression using the -= operator.

AssignUnsignedRightShiftExpr

A compound assignment expression using the >>>= operator.

AssignXorExpr

A compound assignment expression using the ^= operator.

Assignment

A common super-class that represents many varieties of assignments.

AuthorTag

A Javadoc @author tag.

BeforeAnnotation

An @org.junit.Before annotation.

BeforeClassAnnotation

An @org.junit.BeforeClass annotation.

BinaryExpr

A common super-class to represent binary operator expressions.

BitNotExpr

A bit negation expression. For example, ~x.

BitwiseExpr

A bitwise expression.

BlockStmt

A block of statements.

BooleanLiteral

A boolean literal. Either true or false.

BooleanType

A boolean type, which may be either a primitive or a boxed type.

BoundedType

A common super-class for Java types that may have a type bound. This includes type parameters and wildcards.

BoxedType

A boxed type.

BreakStmt

A break statement.

Call

Any call to a callable.

Callable

A callable is a method or constructor.

CastExpr

A cast expression.

CastingExpr

Any kind of expression that casts values from one type to another.

CatchClause

A catch clause in a try statement.

CharacterLiteral

A character literal. For example, '\n'.

CharacterType

A character type, which may be either a primitive or a boxed type.

ChooseExpr

A conditional expression or a switch expression.

Class

A class declaration.

ClassExpr

A Kotlin ::class expression.

ClassInstanceExpr

A class instance creation expression.

ClassNameMethod

The method Class.getName().

ClassObject

A Kotlin object.

ClassOrInterface

A class or interface.

ClassSimpleNameMethod

The method Class.getSimpleName().

CloneMethod

A method with the same signature as java.lang.Object.clone.

CompanionObject

A Kotlin companion object.

ComparisonExpr

A comparison expression.

Compilation

An invocation of the compiler. Note that more than one file may be compiled per invocation. For example, this command compiles three source files:

CompilationUnit

A compilation unit is a .java or .class file.

CompileTimeConstantExpr

A compile-time constant expression.

ConditionNode

A control-flow node that branches based on a boolean condition.

ConditionalExpr

A conditional expression of the form a ? b : c, where a is the condition, b is the expression that is evaluated if the condition evaluates to true, and c is the expression that is evaluated if the condition evaluates to false.

ConditionalStmt

A conditional statement, including if, for, while and dowhile statements.

ConstCase

A constant case of a switch statement.

Constructor

A constructor is a particular kind of callable.

ConstructorCall

A constructor call, which occurs either as a constructor invocation inside a constructor, or as part of a class instance expression.

Container

A file or folder.

ContinueStmt

A continue statement.

DataClass

A Kotlin data class declaration.

DeclAnnotation

An Annotation that applies to a declaration.

DefaultCase

A default or case null, default case of a switch statement or expression.

DelegatedProperty

A Kotlin delegated property.

DeprecatedAnnotation

A @Deprecated annotation.

Directive

A directive in a module declaration.

DivExpr

A binary expression using the / operator.

DoStmt

A do loop.

Documentable

A documentable element that can have an attached Javadoc comment.

DoubleLiteral

A double literal. For example, 4.2.

EQExpr

A binary expression using Java’s == or Kotlin’s === operator.

Element

A program element that has a name.

EmptyStmt

The empty statement.

EnhancedForStmt

An enhanced for loop. (Introduced in Java 5.)

EnterpriseBean

An enterprise bean.

EntityBean

An entity bean.

EnumConstant

An enum constant is a member of a enum type.

EnumType

An enumerated type.

EqualityTest

An equality test is a binary expression using Java’s == or != operators, or Kotlin’s ==, !=, === or !== operators.

EqualsMethod

A method with the same signature as java.lang.Object.equals.

ErrorExpr

An error expression.

ErrorStmt

An error statement.