introscope.oab

Tracer on anonymous inner class

Discussion created by introscope.oab on Apr 18, 2017
Latest reply on Apr 20, 2017 by Sri_Guntupalli

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 ?

Outcomes