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.booleanisEnter()Determine if the monitor is a__monitor_enterstatement.booleanisExit()Determine if the monitor is a__monitor_exitstatement.voidsetEnter(boolean enter) voidsetLock(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, visitDepthPreMethods 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_enterstatement.- Returns:
- true if "enter", false if "exit"
-
isExit
boolean isExit()Determine if the monitor is a__monitor_exitstatement.- 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:IJavaElementDuplicate this element.- Specified by:
duplicatein interfaceIJavaElement- Specified by:
duplicatein interfaceIJavaExpression- Specified by:
duplicatein interfaceIJavaStatement- Returns:
- a (possibly) duplicated object of the same type
-