Module Monitors
This module provides predicates, chiefly locallyMonitors, to check if a given expression is synchronized on a specific monitor.
Import path
import semmle.code.java.ConcurrencyPredicates
| getNodeToBeDominated | Gets the control flow node that must dominate |
| locallyLockedOn | Holds if |
| locallyMonitors | Holds if the expression |
Classes
| ClassMonitor | A class used as a monitor. This is achieved by marking a static method as |
| InstanceMonitor | An instance reference used as a monitor. Either via |
| LockField | A field storing a lock. |
| Monitor | A monitor is any object that is used to synchronize access to a shared resource. This includes locks as well as variables used in synchronized blocks (including |
| VariableMonitor | A variable used as a monitor. The variable is either a lock or is used in a synchronized block. E.g |
Datatypes
| TMonitor | A monitor is any object that is used to synchronize access to a shared resource. This includes locks as well as variables used in synchronized blocks (including |