Reputation:
I am a new user to Intellij. I have a hierarchy where both ClassA and ClassB implement foo() in MyInterface:
public interface MyInterface{
void foo()
}
public class ClassA implements MyInterface{
@Override
public void foo(){
System.out.println("Hello");
}
}
public class ClassB implements MyInterface{
@Override
public void foo(){
System.out.println("World");
}
}
public class HelloWorld {
public static void main(String[] args){
new ClassA().foo();
new ClassB().foo();
}
}
When I do Find Usages on the foo() definition in ClassA, both the foo() from ClassA and ClassB are found. Is there a way to only have the foo() called on the ClassA instance found?
Upvotes: 0
Views: 112