This question already has an answer here:
Suppose I have below code snippet:
class A{
 // Something made below line to execute
 new B().foo();
}
class B{
void foo(){
  new C().bar();
    }
}
class C{
void bar(){
// Log name 'foo' as foo method called bar
    }
}
How can I log method name in bar using some APIs to determine the caller method?
Aucun commentaire:
Enregistrer un commentaire