Package org.jboss.byteman.agent
Class Location.ThrowLocation
- java.lang.Object
-
- org.jboss.byteman.agent.Location
-
- org.jboss.byteman.agent.Location.ThrowLocation
-
-
Field Summary
Fields Modifier and Type Field Description private int
count
count identifying which throw operation should be taken as the trigger point.private java.lang.String
typeName
the name of the exception type to which the method belongs or null if any type will do-
Fields inherited from class org.jboss.byteman.agent.Location
ACCESS_READ, ACCESS_WRITE
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ThrowLocation(int count, java.lang.String typeName)
construct a location identifying a throw trigger point
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Location
create(java.lang.String parameters)
create a location identifying a throw trigger pointLocationType
getLocationType()
identify the type of this locationRuleTriggerAdapter
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 locationRuleCheckAdapter
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 locationjava.lang.String
toString()
-
-
-
Field Detail
-
count
private int count
count identifying which throw operation should be taken as the trigger point. if not specified as a parameter this defaults to the first throw.
-
typeName
private java.lang.String typeName
the name of the exception type to which the method belongs or null if any type will do
-
-
Constructor Detail
-
ThrowLocation
private ThrowLocation(int count, java.lang.String typeName)
construct a location identifying a throw trigger point- Parameters:
count
- count identifying which throw should be taken as the trigger pointtypeName
- the name of the exception type associated with the throw operation
-
-
Method Detail
-
create
protected static Location create(java.lang.String parameters)
create a location identifying a throw trigger point- Parameters:
parameters
- the text of the parameters appended to the location specifier- Returns:
- a throw location or null if the parameters does not contain a valid type name
-
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:
getRuleCheckAdapter
in 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:
getRuleAdapter
in classLocation
- Parameters:
cv
- the current class visitortransformContext
- the current transform context- Returns:
- the required adapter
-
getLocationType
public LocationType getLocationType()
Description copied from class:Location
identify the type of this location- Specified by:
getLocationType
in classLocation
- Returns:
- the type of this location
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-