Hi,
We have three classes A,B & C. Instance methods of all these classes can
call a method in a Class X.
Now if I want to find out which one out of A,B or C called X then in X's method I can do - this.getClass().getName();
But suppose if X calls another method in class Y and in Y I want to find out whether A called X which in turn called Y or B called X which in turn called Y ...and so on ... then how to do this ?
Please help me.
Thanks in advance.
We have three classes A,B & C. Instance methods of all these classes can
call a method in a Class X.
Now if I want to find out which one out of A,B or C called X then in X's method I can do - this.getClass().getName();
But suppose if X calls another method in class Y and in Y I want to find out whether A called X which in turn called Y or B called X which in turn called Y ...and so on ... then how to do this ?
Please help me.
Thanks in advance.