Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse - find all classes that extend interface

Tags:

We have an interface that has a child interface. Ie:

public interface GenCalculator extends Serializable {}  public interface SpecialCalculator extends GenCalculator {} 

In Eclipse, how can you find all interface-s that extend in this case GenCalculator?

If I right click, select "Open Type Hierarchy" in the GenCalculator interface, I only see classes that implement that GenCalculator interface. I want to see everything - those that implement and those that extend.

We're on Eclipse v.3.2.2.

like image 935
Marcus Leon Avatar asked Oct 15 '09 16:10

Marcus Leon


People also ask

How do I find all implemented classes for an interface in Eclipse?

Put the cursor on the name of the interface and press F4 (Open Type Hierarchy). That will open a window that shows a tree with all classes that Eclipse can find that implement the interface.

How many classes can interface extend?

An interface can extend other interfaces, just as a class subclass or extend another class. However, whereas a class can extend only one other class, an interface can extend any number of interfaces. The interface declaration includes a comma-separated list of all the interfaces that it extends.

How do I show all classes in Eclipse?

Try using CTRL + SHIFT + R which displays a list of all classes/files which can be filtered.

Can classes extend interfaces?

An interface is not extended by a class; it is implemented by a class.


1 Answers

Ctrl+T to view all descendants

Press it the combination a second time (see fine print in initial popup) if you want to display super interfaces/classes.

like image 102
Michael Easter Avatar answered Nov 09 '22 03:11

Michael Easter