Package org.jboss.byteman.agent
Class Location.SynchronizeLocation
- java.lang.Object
-
- org.jboss.byteman.agent.Location
-
- org.jboss.byteman.agent.Location.SynchronizeLocation
-
-
Field Summary
Fields Modifier and Type Field Description private intcountcount identifying which synchronization should be taken as the trigger point.private booleanwhenCompleteflag which is false if the trigger should be inserted before the synchronization is performed and true if it should be inserted after-
Fields inherited from class org.jboss.byteman.agent.Location
ACCESS_READ, ACCESS_WRITE
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSynchronizeLocation(int count, boolean whenComplete)construct a location identifying a synchronization trigger point
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Locationcreate(java.lang.String parameters, boolean whenComplete)create a location identifying a synchronization trigger pointLocationTypegetLocationType()identify the type of this locationRuleTriggerAdaptergetRuleAdapter(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 locationRuleCheckAdaptergetRuleCheckAdapter(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 locationjava.lang.StringtoString()
-
-
-
Field Detail
-
count
private int count
count 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 whenComplete
flag which is false if the trigger should be inserted before the synchronization is performed and true if it should be inserted after
-
-
Constructor Detail
-
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 Detail
-
create
protected static Location create(java.lang.String parameters, boolean whenComplete)
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:
getRuleCheckAdapterin 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:
getRuleAdapterin classLocation- Parameters:
cv- the current class visitortransformContext- the current transform context- Returns:
- the required adapter
-
getLocationType
public LocationType getLocationType()
Description copied from class:Locationidentify the type of this location- Specified by:
getLocationTypein classLocation- Returns:
- the type of this location
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-