How to set the same name for parent and child in this situation?
public class ComponentA {
public static void main(String[] args){
Bye bye = new Bye();
Thread t = new Thread(bye);
t.start();
}
}
I cannot add t.setName(Thread.currentThread().getName());, because I need to avoid changing code. I'm looking for solution I can apply from AspectJ class.
Is there any way to put an argument to run method? Or maybe in child thread we can get parent name?
EDIT:
I mean:
- parent - main in ComponentA
- child - run in Bye