Interface IJavaMonitor
- All Superinterfaces:
IJavaElement
,IJavaExpression
,IJavaStatement
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.
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
FLAG_BUILT, FLAG_FIELD_REFERENCES_OUTERCLASS, FLAG_LAMBDA_CLASS, FLAG_LAMBDA_IMPL, FLAG_OPTIONAL_RENDERING, FLAG_SECOND_PARAMETER_IS_OUTER_REF, FLAG_STICKY
-
Method Summary
Modifier and TypeMethodDescriptionDuplicate this element.getLock()
Retrieve the lock object.boolean
isEnter()
Determine if the monitor is a__monitor_enter
statement.boolean
isExit()
Determine if the monitor is a__monitor_exit
statement.void
setEnter
(boolean enter) void
setLock
(IJavaExpression lock) Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
addFlags, addTag, canCauseException, collectAllPhysicalOffsets, generate, getData, getElementType, getFlags, getOrigin, getPhysicalMethodIndex, getPhysicalOffset, getReconAnon, getReconEnum, getReconEnummap, getReconLambda, getSubElements, getTags, hasFlags, hasPhysicalMethodIndex, hasPhysicalOffset, isReconArtifact, removeFlags, removeTag, replaceSubElement, setData, setFlags, setLambdaRecon, setOrigin, setPhysicalMethodIndex, setPhysicalOffset, setReconAnon, setReconEnum, setReconEnummap, toShortString, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPre
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaStatement
getIntermediateOffset, setIntermediateOffset
-
Method Details
-
isEnter
boolean isEnter()Determine if the monitor is a__monitor_enter
statement.- Returns:
- true if "enter", false if "exit"
-
isExit
boolean isExit()Determine if the monitor is a__monitor_exit
statement.- Returns:
-
setEnter
void setEnter(boolean enter) -
getLock
IJavaExpression getLock()Retrieve the lock object.- Returns:
- the lock object, never null
-
setLock
-
duplicate
IJavaMonitor duplicate()Description copied from interface:IJavaElement
Duplicate this element.- Specified by:
duplicate
in interfaceIJavaElement
- Specified by:
duplicate
in interfaceIJavaExpression
- Specified by:
duplicate
in interfaceIJavaStatement
- Returns:
- a (possibly) duplicated object of the same type
-