Package org.jboss.byteman.agent
Class Location.SynchronizeLocation
java.lang.Object
org.jboss.byteman.agent.Location
org.jboss.byteman.agent.Location.SynchronizeLocation
- Enclosing class:
Location
location identifying a synchronization trigger point
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
count identifying which synchronization should be taken as the trigger point.private boolean
flag which is false if the trigger should be inserted before the synchronization is performed and true if it should be inserted afterFields inherited from class org.jboss.byteman.agent.Location
ACCESS_READ, ACCESS_WRITE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SynchronizeLocation
(int count, boolean whenComplete) construct a location identifying a synchronization trigger point -
Method Summary
Modifier and TypeMethodDescriptionprotected static Location
create a location identifying a synchronization trigger pointidentify the type of this locationgetRuleAdapter
(org.objectweb.asm.ClassVisitor cv, TransformContext transformContext) return an adapter which can be used to insert a trigger call in a method containing a trigger point whose position matches this locationgetRuleCheckAdapter
(org.objectweb.asm.ClassVisitor cv, TransformContext transformContext) return an adapter which can be used to check whether a method contains a trigger point whose position matches this locationtoString()
-
Field Details
-
count
private int countcount identifying which synchronization should be taken as the trigger point. if not specified as a parameter this defaults to the first synchronization. -
whenComplete
private boolean whenCompleteflag which is false if the trigger should be inserted before the synchronization is performed and true if it should be inserted after
-
-
Constructor Details
-
SynchronizeLocation
private SynchronizeLocation(int count, boolean whenComplete) construct a location identifying a synchronization trigger point- Parameters:
count
- count identifying which synchronization should be taken as the trigger pointwhenComplete
- false if the trigger should be inserted before the synchronization is performed and true if it should be inserted after
-
-
Method Details
-
create
create a location identifying a synchronization trigger point- Parameters:
parameters
- the text of the parameters appended to the location specifierwhenComplete
- false if the trigger should be inserted before the synchronization is performed and true if it should be inserted after- Returns:
- a method entry location or null if the parameters is not a blank String
-
getRuleCheckAdapter
public RuleCheckAdapter getRuleCheckAdapter(org.objectweb.asm.ClassVisitor cv, TransformContext transformContext) return an adapter which can be used to check whether a method contains a trigger point whose position matches this location- Specified by:
getRuleCheckAdapter
in classLocation
- Parameters:
cv
- the current class visitortransformContext
- the current transform context- Returns:
- the required adapter
-
getRuleAdapter
public RuleTriggerAdapter getRuleAdapter(org.objectweb.asm.ClassVisitor cv, TransformContext transformContext) return an adapter which can be used to insert a trigger call in a method containing a trigger point whose position matches this location- Specified by:
getRuleAdapter
in classLocation
- Parameters:
cv
- the current class visitortransformContext
- the current transform context- Returns:
- the required adapter
-
getLocationType
Description copied from class:Location
identify the type of this location- Specified by:
getLocationType
in classLocation
- Returns:
- the type of this location
-
toString
-