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

Module Collections

Provides classes and predicates for reasoning about instances of java.util.Collection and their methods.

Import path

import semmle.code.java.Collections

Imports

java

Provides all default Java QL imports.

Predicates

indirectlyInstantiates

Generalisation of instantiates that takes subtyping into account:

instantiates

Holds if the type t is a parameterization of g, where the i-th type parameter of g is instantiated to arg.

Classes

CollectionMethod

A method declared in a collection type.

CollectionMutation

A method call that mutates a collection.

CollectionMutator

A method that mutates the collection it belongs to.

CollectionQueryMethod

A method that queries the contents of a collection without mutating it.

CollectionSizeMethod

The size method on java.util.Collection.

CollectionType

A reference type that extends a parameterization of java.util.Collection.

FreshCollection

A new expression that allocates a fresh, empty collection.