1 2 Previous Next 16 Replies Latest reply on Sep 9, 2009 6:50 AM by adinn Go to original post
      • 15. Re: instrumenting boot load classes such as java.io.File
        stefanegli

        that should have read:

        METHOD <init>(String,boolean)


        • 16. Re: instrumenting boot load classes such as java.io.File
          adinn

           


          Awesome! Just checked your fix for BYTEMAN-27 - works smooth as!


          Awecome is good :-)


          I have only one input for the docu (it might just be me though not having figured it out myself): It was not rightly intuitive how you'd have to define constructor signatures if you had more than one - i.e. using
          METHOD <init>(String,boolean).
          

          Maybe it would be worth a sidenote in the docu.


          Thanks for the feedback. I'll update the docs to clarify as follows:

          Constructors can be specified as the target method just like any normal static or instance method. The only difference is that they just have strange names:

          for an instance constructor
          <init>
          for a class static initializer
          <clinit>


          If the target method or consructor is overloaded (i.e. has multiple signatures) then a signature may be supplied in order to ensure that a trigger is injected into the method with that specific signature e.g.
          METHOD <init>(String,boolean)
          


          If no signature is supplied then all methods with a matching name will be considered for triggger injection, irrespective of their signature. Any method which also matches the location specifier and contains any local variables or parameters mentioned in the rule body will have a trigger injected. So, for example
          RULE my Foo constructor rule
          CLASS org.my.Foo
          METHOD <init>
          AT ENTRY
           . . .
          

          will inject a trigger for "my Foo constructor rule" into all the constructor methods of class org.my.Foo.

          n.b. a secondary problem with the old AT ENTRY implementation was that only the first matched method got a trigger. Multiple matches should work now.


          Otherwise, got everything working with byteman as intended! Probably gonna use it extensively as quality assurance and paranoia checking tool!


          Great! I am very glad to have a satisfied customer and I will be looking forward to bug reports and [suggestions for improvements and new features. Don't forget using it as a debugging aid too ;-)

          1 2 Previous Next