For context, say I have these classes:
public class Foo {
public void doStuff() {}
}
public class Bar extends Foo {
@Override
public void doStuff() {}
}
public class Zig extends Foo {
@Override
public void doStuff() {}
}
I'm trying to find only calls to Bar#doStuff().
I've tried:
- Java Search for
Bar.doStuff - "Open Call Hierarchy" on
Bar#doStuff()
but they appear to return calls to both Bar.doStuff() and Foo.doStuff() and Zig.doStuff(). Is there something else I need to do, or am I misunderstanding the results I'm getting?
To find the calls which are definitely from
Bar, you can markBar#doStuffas@Deprecated, and then create a new "Problems" view with a filter to find just these messages.to create the new Problems view:
New Problems ViewConfigure ContentsErrors/Warnings in Projectcontainsfilter (underDescriptionheading) as appropriateNote: this will not find cases where
Bars are stored asFoos, e.g.: