Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-104

add call stack util methods to default helper

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.3.0
    • None
    • None
    • None

      For some use cases it is desirable to trigger conditionally on the state of the call stack. For example, to trigger only when MyClass.interestingMethod is called from OtherClass.someMethod. Whilst it is possible to achieve this by instrumenting all calling points of interest, it is in some scenarios preferable to instrument the called point and then 'filter' on the calling class/method. To facilitate this, the default helper should expose functions useful to IF clauses e.g.

      boolean calledFrom(String regexpForCallingClassAndMethod)
      boolean calledIndirectlyFrom(int stackFramesToOffset, String regexpForCallingClassAndMethod)
      boolean calledIndirectlyFrom(int minStackFramesOffset, int maxStackFramesOffset, String regexpForCallingClassAndMethod)

              rhn-engineering-adinn Andrew Dinn
              rhn-engineering-jhallida Jonathan Halliday
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: