org.jboss.byteman.agent
Class Location

java.lang.Object
  extended by org.jboss.byteman.agent.Location

public abstract class Location
extends java.lang.Object

Specifies a location in a method at which a rule trigger should be inserted


Field Summary
static int ACCESS_READ
          flag indicating that a field access location refers to field READ operations
static int ACCESS_WRITE
          flag indicating that a field access location refers to field WRITE operations
 
Constructor Summary
Location()
           
 
Method Summary
static Location create(LocationType type, java.lang.String parameters)
          create a location object of a given type
abstract  LocationType getLocationType()
          identify the type of this location
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
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

Location

public Location()
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 specified
parameters - 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

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

Returns:
the required adapter

getLocationType

public abstract LocationType getLocationType()
identify the type of this location

Returns:
the type of this location


Copyright © 2011. All Rights Reserved.