# Interface: com.pnfsoftware.jeb.core.units.code.java.IJavaMonitor

Java AST interface to represent a special "monitor" statement. It can be one of two types: 
 
- `__monitor_enter(lock)`
-  
- `__monitor_exit(lock)`
-  

 

 Such statements are not legal Java constructs. Combined with try\-finally blocks, they are used to represent very high\-level constructs known as `synchronized` blocks.

## Method: duplicate
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaMonitor`


## Method: getLock
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`

Description: Retrieve the lock object.
return: the lock object, never null

## Method: isEnter
- return type: `boolean`

Description: Determine if the monitor is a `__monitor_enter` statement.
return: true if "enter", false if "exit"

## Method: isExit
- return type: `boolean`

Description: Determine if the monitor is a `__monitor_exit` statement.
return: true if "exit", false if "enter"

## Method: setEnter
- parameter: `enter`, type: `boolean`

Description: Set the monitor direction.
parameter: enter: true for `__monitor_enter`, false for `__monitor_exit`

## Method: setLock
- parameter: `lock`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`

Description: Set the lock object.
parameter: lock: lock object expression

