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

rule-action macro for current class / method names

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.1.3
    • Component/s: None
    • Labels:
      None

      Description

      It would be nice if the action/expression language allowed use of a built-in or $macro that would expand to a string literal that describes the context of the execution site of the injected action. These macros could be expanded at injection time rather than at run time, eschewing unwinding. With them, a rule pair vaguely like this could enable lightweight callgraph tracing:

      RULE foo_entry
      CLASS ^foo
      METHOD bar()
      AT ENTRY
      DO SOME_PRINT_THING($class, $method, "entered")
      ENDRULE

      RULE foo_exit
      CLASS ^foo
      METHOD bar()
      AT EXIT
      DO SOME_PRINT_THING($class, $method, "exited")
      ENDRULE

      (Maybe a textualized $macro of the AT <event> field could further compact things.)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adinn Andrew Dinn
                Reporter:
                fche Frank Eigler
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: