Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find which classes implement a particular interface in Eclipse?

I have an application as JAR file with many dependencies. For some reason I need to decompile one of the libraries and open it up with Eclipse. For a given interface in the project, is there a way to find the class(s) that implements it? It may be the case that the interface was implemented in other library that I didn't decompile yet. Is it possible to do this for this kind of classes?

like image 783
Am1rr3zA Avatar asked Sep 12 '11 09:09

Am1rr3zA


People also ask

How do you identify the class which is an interface?

Differences between a Class and an Interface:A class can be instantiated i.e, objects of a class can be created. An Interface cannot be instantiated i.e, objects cannot be created. Classes does not support multiple inheritance. Interface supports multiple inheritance.

Which class is used to implement an interface?

A class implements an interface, thereby inheriting the abstract methods of the interface. Along with abstract methods, an interface may also contain constants, default methods, static methods, and nested types. Method bodies exist only for default methods and static methods.

How do I know where a method is used in Eclipse?

Right click and select References > Project or References > Workspace from the pop-up menu. Show activity on this post. This will show you a Search view containing the hierarchy of class and method which using this method.


1 Answers

Right-click on the interface, and choose "Open type hierarchy". Then click on "Show the subtype hierarchy".

like image 94
JB Nizet Avatar answered Oct 27 '22 05:10

JB Nizet