Possible Duplicate:
How do you find all subclasses of a given class in Java?
Hi,
I would like to get a list of classes that implement an interface in Java at runtime so I can do a lookup service without having to hard code it. Is there a simple way of doing this? I fear not.
If you only load classes from the disk or from URLs then you can scan the classpath and find subclasses "manually".
It's fairly simple using reflection. Read this article from JavaWorld
http://www.javaworld.com/javaworld/javatips/jw-javatip113.html