DX Application Performance Management

  • 1.  Tracer on anonymous inner class

    Posted Apr 18, 2017 04:21 AM

    Is there a way to add a Tracer on an anonymous inner class ?

    As for example (from this link) :

     

    public class InnerTest {        
           public InnerTest() {            
                JButton j = new JButton("button");            
                j.addActionListener(new ActionListener() {                
                     public void actionPerformed(ActionEvent e) {                    
                         //do something                  
                     }
                });
           }    
    }

    Can we get a metric on actionPerformed ?

    AspectJ seems to be able to do it, any way to describe it with Introscope ?



  • 2.  Re: Tracer on anonymous inner class

    Posted Apr 20, 2017 05:30 AM

    OK, found after a few tests.

    Juste use the generated inner class, for example :

    InnerTest$12

    Each inner class will be generate in $xx file, Introscope is able to monitor this one.



  • 3.  Re: Tracer on anonymous inner class

    Broadcom Employee
    Posted Apr 20, 2017 07:16 AM

    Great, Thanks for sharing!