With Eclipse it is possible to find all references of a method, member or class. Is it also possible to find all references to the monitor of a synchronized?
If this is not possible with Eclipse then is it possible with another Java IDE?
My problem is that the monitor object hat many references. A search for all references will return to many results. I will only see where are synchronized with this object.
EDIT: I add a sample what i means:
public class LockClass{
public synchronized void add(Object any){
}
}
public class AnyOther{
private LockClass lock;
public AnyOther(LockClass lock){
this.lock = lock;
}
public void doSomethings(){
synchronized(lock){
//...
}
}
Now I want search all synchronized which use the LockClass as monitor. This is a static analyses. In my sample I want find:
To find references: Select your element->rt-click menu->References->workspace
Its not possible to find all possible synchronized blocks on the same object, because the actual object pointed by a reference would depend at runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With