Searching for Method Implementations Within an Inheritance / Implementation Hierarchy?

Hi,

Is there an expedient way to find all the implementations and / or overrides of a particular method, say, hashCode(), within a given class hierarchy (starting from an interface)?


Randall Schulz

3 comments
Comment actions Permalink

Try ctrl-shift-I for the implementations and / or overrides of a particular method.

Otherwise I add 'final' to a common superclass and look for errors ..

or change the interface to like: float hashCode(); and look for errors.

0
Comment actions Permalink

- Put your cursor on the abstract method.
- Choose menu-item Search>Find Usages (or hit ALT-F7)
- Select 'implementing methods' and choose the appropriate scope

this should do the trick (or I'm misunderstanding the question )

hth

Koen Weyn

0
Comment actions Permalink

Thanks.

However, in the case at hand, the method I care about is hashCode(). The hierarchy I care about starts in an interface but the method in question is defined in Object, so how can I get both criteria to constrain the search?

As it turns out, I was able to use a recursive egrep and a filter on file names to find the classes I need to, but I'm still interested in the answer. I'm sure it'll come up again some time.


Randall Schulz

0

Please sign in to leave a comment.