org.jboss.byteman.agent
Class Location.FieldAccessLocation

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

private static class Location.FieldAccessLocation
extends Location.AccessLocation

location identifying a field access trigger point


Field Summary
private  java.lang.String fieldName
          the name of the field being accessed at the point where the trigger point should be inserted
private  java.lang.String typeName
          the name of the type to which the field belongs or null if any type will do
 
Fields inherited from class org.jboss.byteman.agent.Location.AccessLocation
count, flags, whenComplete
 
Fields inherited from class org.jboss.byteman.agent.Location
ACCESS_READ, ACCESS_WRITE
 
Constructor Summary
private Location.FieldAccessLocation(java.lang.String typeName, java.lang.String fieldName, int count, int flags, boolean whenComplete)
          construct a location identifying a field read trigger point
 
Method Summary
 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.AccessLocation
create, getLocationType
 
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

fieldName

private java.lang.String fieldName
the name of the field being accessed at the point where the trigger point should be inserted


typeName

private java.lang.String typeName
the name of the type to which the field belongs or null if any type will do

Constructor Detail

Location.FieldAccessLocation

private Location.FieldAccessLocation(java.lang.String typeName,
                                     java.lang.String fieldName,
                                     int count,
                                     int flags,
                                     boolean whenComplete)
construct a location identifying a field read trigger point

Parameters:
typeName - the name of the class owning the field
fieldName - the name of the field being read
count - count identifying which access should be taken as the trigger point
flags - bit field comprising one or other of flags ACCESS_READ and ACCESS_WRITE identifying whether this specifies field READ or WRITE operations
whenComplete - false if the trigger should be inserted before the access is performed and true if it should be inserted after
Method Detail

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

toString

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