org.jboss.byteman.agent
Class Location.SynchronizeLocation

java.lang.Object
  extended by org.jboss.byteman.agent.Location
      extended by org.jboss.byteman.agent.Location.SynchronizeLocation
Enclosing class:
Location

private static class Location.SynchronizeLocation
extends Location

location identifying a synchronization trigger point


Field Summary
private  int count
          count identifying which synchronization should be taken as the trigger point.
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
 
Fields inherited from class org.jboss.byteman.agent.Location
ACCESS_READ, ACCESS_WRITE
 
Constructor Summary
private Location.SynchronizeLocation(int count, boolean whenComplete)
          construct a location identifying a synchronization trigger point
 
Method Summary
protected static Location create(java.lang.String parameters, boolean whenComplete)
          create a location identifying a synchronization trigger point
 LocationType getLocationType()
          identify the type of this location
 RuleTriggerAdapter getRuleAdapter(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
 RuleCheckAdapter getRuleCheckAdapter(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
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.byteman.agent.Location
create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

Location.SynchronizeLocation

private Location.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 point
whenComplete - 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 specifier
whenComplete - 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(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 class Location
Returns:
the required adapter

getRuleAdapter

public RuleTriggerAdapter getRuleAdapter(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 class Location
Returns:
the required adapter

getLocationType

public LocationType getLocationType()
Description copied from class: Location
identify the type of this location

Specified by:
getLocationType in class Location
Returns:
the type of this location

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object