Class Location.InvokeLocation
java.lang.Object
org.jboss.byteman.agent.Location
org.jboss.byteman.agent.Location.InvokeLocation
- Enclosing class:
Location
location identifying a method invocation trigger point
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intcount identifying which invocation should be taken as the trigger point.private Stringthe name of the method being invoked at the point where the trigger point should be insertedprivate Stringthe method signature in externalised formprivate Stringthe name of the type to which the method belongs or null if any type will doprivate booleanflag which is false if the trigger should be inserted before the method invocation is performed and true if it should be inserted afterFields inherited from class Location
ACCESS_READ, ACCESS_WRITE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInvokeLocation(String typeName, String methodName, String signature, int count, boolean whenComplete) construct a location identifying a method invocation trigger point -
Method Summary
Modifier and TypeMethodDescriptionprotected static Locationcreate a location identifying a method entry 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
-
methodName
the name of the method being invoked at the point where the trigger point should be inserted -
typeName
the name of the type to which the method belongs or null if any type will do -
signature
the method signature in externalised form -
count
private int countcount identifying which invocation should be taken as the trigger point. if not specified as a parameter this defaults to the first invocation. -
whenComplete
private boolean whenCompleteflag which is false if the trigger should be inserted before the method invocation is performed and true if it should be inserted after
-
-
Constructor Details
-
InvokeLocation
private InvokeLocation(String typeName, String methodName, String signature, int count, boolean whenComplete) construct a location identifying a method invocation trigger point- Parameters:
typeName- the name of the class owning the methodmethodName- the name of the method being calledsignature- the method signature in externalised formcount- count identifying which invocation should be taken as the trigger pointwhenComplete- false if the trigger should be inserted before the method invocation is performed and true if it should be inserted after
-
-
Method Details
-
create
create a location identifying a method entry trigger point- Parameters:
parameters- the text of the parameters appended to the location specifierwhenComplete- false if the trigger should be inserted before the access is performed and true if ti shoudl 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
Description copied from class:Locationidentify the type of this location- Specified by:
getLocationTypein classLocation- Returns:
- the type of this location
-
toString
-