Package org.jboss.byteman.agent
Class Location.NewLocation
java.lang.Object
org.jboss.byteman.agent.Location
org.jboss.byteman.agent.Location.NewLocation
- Enclosing class:
Location
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intcount identifying which new operation should be taken as the trigger point.(package private) intnumber of array dimensions that should be matched at an array allocation site or 0 if plain, non-array object allocations should be matchedprivate Stringthe name of the new type being created or the empty String if no typename was specifiedprivate 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 org.jboss.byteman.agent.Location
ACCESS_READ, ACCESS_WRITE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNewLocation(String typeName, int count, int dims, boolean whenComplete) -
Method Summary
Modifier and TypeMethodDescriptionprotected static Locationcreate a location identifying a method exceptional exit 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
-
typeName
the name of the new type being created or the empty String if no typename was specified -
count
private int countcount identifying which new operation should be taken as the trigger point. if not specified as a parameter this defaults to the first invocation. if 'ALL' was specified this takes value 0. -
dims
int dimsnumber of array dimensions that should be matched at an array allocation site or 0 if plain, non-array object allocations should be matched -
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
-
NewLocation
-
-
Method Details
-
create
create a location identifying a method exceptional exit trigger point- Parameters:
parameters- the text of the parameters appended to the location specifier- 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) Description copied from class:Locationreturn 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) Description copied from class:Locationreturn 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
-