hello If I have one class with some public method, is there a way to find out wich class have called it, and do it at runtime? I can't modie classes that a using this method.
> If I have one class with some public method, is there a way to find out > wich class have called it, and do it at runtime? > I can't modie classes that a using this method.
You can try to construct an exception, fill in the stack trace and find the respective entry in the array of StackTraceElements.
Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...