Class TryCatchDetails
java.lang.Object
org.jboss.byteman.agent.adapter.cfg.TryCatchDetails
auxiliary used by CFG to store details of a specific try catch block
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CFGback link to the control flow graphprivate org.objectweb.asm.Labelthe label identifying the end of the try catch blockprivate org.objectweb.asm.Labelthe label identifying the start of the try catch block handlerprivate booleantrue if this is a trigger handler otherwise falseprivate List<CodeLocation> a list of monitor enter instructions which are opened within the scope of this try catch block and hence which may require closing in the associated handlerprivate List<TryCatchDetails> A list of details for all the try catch regions which shadow this region i.e.private org.objectweb.asm.Labelthe label identifying the start of the try catch blockprivate Stringthe name of the exception type handled by the handler or null if it is a catch all handler -
Constructor Summary
ConstructorsConstructorDescriptionTryCatchDetails(CFG cfg, org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, String type, boolean isTriggerHandler) construct a try catch details instance -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOpenEnter(CodeLocation openEnter) add a new monitor enter location to the list of open locations associated with this handler maintaining the reverse position orderingvoidaddOpenLocations(List<CodeLocation> openMonitorEnters) add all the open locations associated with this handler to the supplied list of open locations maintaining the reverse position orderingvoidaddShadowRegion(TryCatchDetails tryCatchDetails) add a shadowing region to the list of regions which shadow this onebooleancontainsOpenEnter(CodeLocation openEnter) check if a monitor enter location belongs to the list of open locations associated with this handlerorg.objectweb.asm.LabelgetEnd()org.objectweb.asm.Labelorg.objectweb.asm.LabelgetStart()getType()booleanhasShadowRegion(TryCatchDetails tryCatchDetails) booleantoString()
-
Field Details
-
cfg
back link to the control flow graph -
start
private org.objectweb.asm.Label startthe label identifying the start of the try catch block -
end
private org.objectweb.asm.Label endthe label identifying the end of the try catch block -
handler
private org.objectweb.asm.Label handlerthe label identifying the start of the try catch block handler -
openEnters
a list of monitor enter instructions which are opened within the scope of this try catch block and hence which may require closing in the associated handler -
type
the name of the exception type handled by the handler or null if it is a catch all handler -
isTriggerHandler
private boolean isTriggerHandlertrue if this is a trigger handler otherwise false -
shadowRegions
A list of details for all the try catch regions which shadow this region i.e. which prevent exception control flow to it from an embedded region because they either catch everything or they catch the same type or a supertype of this exception.
-
-
Constructor Details
-
TryCatchDetails
public TryCatchDetails(CFG cfg, org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, String type, boolean isTriggerHandler) construct a try catch details instance- Parameters:
cfg- the control flow graphstart- the try block startend- the try block endhandler- the handler block starttype- the handled exception typeisTriggerHandler- true if this handler handles Byteman errors
-
-
Method Details
-
getStart
public org.objectweb.asm.Label getStart() -
getEnd
public org.objectweb.asm.Label getEnd() -
getHandler
public org.objectweb.asm.Label getHandler() -
getType
-
isTriggerHandler
public boolean isTriggerHandler() -
addOpenEnter
add a new monitor enter location to the list of open locations associated with this handler maintaining the reverse position ordering- Parameters:
openEnter- the location of the monitor enter
-
containsOpenEnter
check if a monitor enter location belongs to the list of open locations associated with this handler- Parameters:
openEnter- the location of the monitor enter- Returns:
- true if it belongs ot the list
-
addOpenLocations
add all the open locations associated with this handler to the supplied list of open locations maintaining the reverse position ordering- Parameters:
openMonitorEnters- list of locations of the monitor enters
-
getOpenEnters
-
addShadowRegion
add a shadowing region to the list of regions which shadow this one- Parameters:
tryCatchDetails- detaisl of a try catch block
-
getShadowRegions
-
hasShadowRegion
-
toString
-