Class Location.InvokeLocation

java.lang.Object
org.jboss.byteman.agent.Location
org.jboss.byteman.agent.Location.InvokeLocation
Enclosing class:
Location

private static class Location.InvokeLocation extends Location
location identifying a method invocation trigger point
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    count identifying which invocation should be taken as the trigger point.
    private String
    the name of the method being invoked at the point where the trigger point should be inserted
    private String
    the method signature in externalised form
    private String
    the name of the type to which the method belongs or null if any type will do
    private boolean
    flag which is false if the trigger should be inserted before the method invocation is performed and true if it should be inserted after

    Fields inherited from class org.jboss.byteman.agent.Location

    ACCESS_READ, ACCESS_WRITE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    InvokeLocation(String typeName, String methodName, String signature, int count, boolean whenComplete)
    construct a location identifying a method invocation trigger point
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static Location
    create(String parameters, boolean whenComplete)
    create a location identifying a method entry trigger point
    identify the type of this location
    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
    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 org.jboss.byteman.agent.Location

    create

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • methodName

      private String methodName
      the name of the method being invoked at the point where the trigger point should be inserted
    • typeName

      private String typeName
      the name of the type to which the method belongs or null if any type will do
    • signature

      private String signature
      the method signature in externalised form
    • count

      private int count
      count identifying which invocation should be taken as the trigger point. if not specified as a parameter this defaults to the first invocation.
    • whenComplete

      private boolean whenComplete
      flag 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

    • InvokeLocation

      private InvokeLocation(String typeName, String methodName, String signature, int count, boolean whenComplete)
      construct a location identifying a method invocation trigger point
      Parameters:
      typeName - the name of the class owning the method
      methodName - the name of the method being called
      signature - the method signature in externalised form
      count - count identifying which invocation should be taken as the trigger point
      whenComplete - false if the trigger should be inserted before the method invocation is performed and true if it should be inserted after
  • Method Details

    • create

      protected static Location create(String parameters, boolean whenComplete)
      create a location identifying a method entry trigger point
      Parameters:
      parameters - the text of the parameters appended to the location specifier
      whenComplete - false if the trigger should be inserted before the access is performed and true if ti shoudl be inserted after
      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)
      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 class Location
      Parameters:
      cv - the current class visitor
      transformContext - 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 class Location
      Parameters:
      cv - the current class visitor
      transformContext - 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 class Location
      Returns:
      the type of this location
    • toString

      public String toString()
      Overrides:
      toString in class Object