Package org.jboss.byteman.agent
Class Location
java.lang.Object
org.jboss.byteman.agent.Location
- Direct Known Subclasses:
Location.AccessLocation,Location.EntryLocation,Location.ExceptionExitLocation,Location.ExitLocation,Location.InvokeLocation,Location.LineLocation,Location.NewLocation,Location.SynchronizeLocation,Location.ThrowLocation
Specifies a location in a method at which a rule trigger should be inserted
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classlocation identifying a generic access trigger pointprivate static classlocation identifying a method entry trigger pointprivate static classlocation identifying a method exceptional exit trigger pointprivate static classlocation identifying a method exit trigger pointprivate static classlocation identifying a field access trigger pointprivate static classlocation identifying a method invocation trigger pointprivate static classlocation identifying a method line trigger pointprivate static classprivate static classlocation identifying a synchronization trigger pointprivate static classlocation identifying a throw trigger pointprivate static classlocation identifying a variable access trigger point -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intflag indicating that a field access location refers to field READ operationsstatic final intflag indicating that a field access location refers to field WRITE operations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Locationcreate(LocationType type, String parameters) create a location object of a given typeabstract LocationTypeidentify the type of this locationabstract 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 locationabstract RuleCheckAdaptergetRuleCheckAdapter(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
-
Field Details
-
ACCESS_READ
public static final int ACCESS_READflag indicating that a field access location refers to field READ operations- See Also:
-
ACCESS_WRITE
public static final int ACCESS_WRITEflag indicating that a field access location refers to field WRITE operations- See Also:
-
-
Constructor Details
-
Location
public Location()
-
-
Method Details
-
create
create a location object of a given type- Parameters:
type- the type of location being specifiedparameters- the text of the parameters appended to the location specifier- Returns:
- a location of the appropriate type or null if the parameters are incorrectly specified
-
getRuleCheckAdapter
public abstract 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- Parameters:
cv- the current class visitortransformContext- the current transform context- Returns:
- the required adapter
-
getRuleAdapter
public abstract 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- Parameters:
cv- the current class visitortransformContext- the current transform context- Returns:
- the required adapter
-
getLocationType
identify the type of this location- Returns:
- the type of this location
-