(i) practices of the Eclipse IDE
It will parse all Java files and class files.
Tip: In Eclipse, select interface and press F4 to see all implementation classes and sub-interfaces.
For example:
(b) How do you do it yourself?
(1) If you don't know what the implementation classes are for this interface
With Java default ClassLoader there is no way to get all the implementation classes, because ClassLoader will load the class into the static zone when the program is running, that is, if your program needs to use a class, The JVM finds that the class has not been loaded by ClassLoader, it will take the initiative to load it, otherwise it will skip, and you can't know the implementation classes that are not loaded.
(2) If you know what implementation classes
That is simple, you configure an XML file, the implementation of the class's full class name in the XML file, and then write a parser, iterate each class name, directly loaded with Class.forName can be.
How do I get all the implementation classes (and sub-interfaces) for an interface? Example: Eclipse IDE