Package org.jboss.byteman.agent
Class Location.FieldAccessLocation
- java.lang.Object
-
- org.jboss.byteman.agent.Location
-
- org.jboss.byteman.agent.Location.AccessLocation
-
- 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
Fields Modifier and Type Field Description private java.lang.StringfieldNamethe name of the field being accessed at the point where the trigger point should be insertedprivate java.lang.StringtypeNamethe 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
Constructors Modifier Constructor Description privateFieldAccessLocation(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleTriggerAdaptergetRuleAdapter(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()-
Methods inherited from class org.jboss.byteman.agent.Location.AccessLocation
create, getLocationType
-
-
-
-
Constructor Detail
-
FieldAccessLocation
private 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 fieldfieldName- the name of the field being readcount- count identifying which access should be taken as the trigger pointflags- bit field comprising one or other of flags ACCESS_READ and ACCESS_WRITE identifying whether this specifies field READ or WRITE operationswhenComplete- 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(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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-