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
public abstract class Location extends java.lang.Object
Specifies a location in a method at which a rule trigger should be inserted
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Location.AccessLocation
location identifying a generic access trigger pointprivate static class
Location.EntryLocation
location identifying a method entry trigger pointprivate static class
Location.ExceptionExitLocation
location identifying a method exceptional exit trigger pointprivate static class
Location.ExitLocation
location identifying a method exit trigger pointprivate static class
Location.FieldAccessLocation
location identifying a field access trigger pointprivate static class
Location.InvokeLocation
location identifying a method invocation trigger pointprivate static class
Location.LineLocation
location identifying a method line trigger pointprivate static class
Location.NewLocation
private static class
Location.SynchronizeLocation
location identifying a synchronization trigger pointprivate static class
Location.ThrowLocation
location identifying a throw trigger pointprivate static class
Location.VariableAccessLocation
location identifying a variable access trigger point
-
Field Summary
Fields Modifier and Type Field Description static int
ACCESS_READ
flag indicating that a field access location refers to field READ operationsstatic int
ACCESS_WRITE
flag indicating that a field access location refers to field WRITE operations
-
Constructor Summary
Constructors Constructor Description Location()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Location
create(LocationType type, java.lang.String parameters)
create a location object of a given typeabstract LocationType
getLocationType()
identify the type of this locationabstract 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 locationabstract 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
-
-
-
Field Detail
-
ACCESS_READ
public static final int ACCESS_READ
flag indicating that a field access location refers to field READ operations- See Also:
- Constant Field Values
-
ACCESS_WRITE
public static final int ACCESS_WRITE
flag indicating that a field access location refers to field WRITE operations- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static Location create(LocationType type, java.lang.String parameters)
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
public abstract LocationType getLocationType()
identify the type of this location- Returns:
- the type of this location
-
-