I have next classes:
abstract public class Parent{
static public void logRequestor(){
//String requestor = // How to get requestor?
//Log.e("Requestor is: " + requestor);
}
}
class ChildA extends Parent{
}
class ChildB extends Parent{
}
Somewhere I have next lines:
ChildA.logRequestor();
ChildB.logRequestor();
ChildA.logRequestor();
How to know, which child are called static parent method with no params in function logRequestor
? I want to have next logs:
Requestor is ChildA
Requestor is ChildB
Requestor is ChildA