I need to be able identify the Object which is calling a specific method. So if for example I have the following
JLabel l = new JLabel("Hello");
JLabel label = new JLabel("HELLO");
label.setText("BYE");
I need to be able to identify the object in variable label is actually calling setText and not l. I did manage to get the type of the object calling the method, in this case being JLabel, as I am using SOOT to be able to get method information. However what I actually need is the object making use of this method.
Is there a way to be able to identify the actual object calling the method?