简体   繁体   English

Java - 查找接口实现类的实用程序

[英]Java - Utility to find the implementation classes of an interface

Is there any utility in java to find the list of all implementation class of an interface. java 中是否有任何实用程序来查找接口的所有实现 class 的列表。 Lets say for an interface how many implementation classes are available.让我们说一个接口有多少个实现类可用。 so that i can add or tweak the existing code based on the requirements.这样我就可以根据要求添加或调整现有代码。
Is that feature ships with Eclipse IDE?该功能是否随 Eclipse IDE 一起提供?
Any open source tool available?有没有可用的开源工具?

In Eclipse you can see Type Hierarchy by selecting your interface/class name and press shortcut key在 Eclipse 中,您可以通过选择您的接口/类名称并按快捷键来查看类型层次结构

  1. In windows CTRL + T在 windows CTRL + T
  2. In Mac COMMAND + T在 Mac命令 + T

Or, you could simply select your interface/class --> right click --> Open Type Hierarchy或者,您可以简单地select your interface/class --> right click --> Open Type Hierarchy

to see the list of all implementation classes for selected interface查看所选接口的所有实现类的列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM