I want to know how a particular variable in Java class is used. Are there any static code analysis tools which help me trace out the variable.
For example:
Class A {
int trackMe;
function usedHere(trackMe);
B bobject = new B(trackMe);
...
}
Class B {
B (int var) {
copyOfTrackMe = var;
}
}
In the above example if I want to track the variable "trackMe". I should be notified by the tool that trackMe is passed to function usedHere and also to constructor of B where a copy is made.
Any inputs are appreciated.
******* EDIT *******
I do not want to run the Code or alter the code in order to achieve this. So I guess none of the IDE debuggers won't get the job done.