Hi, I have an abstract class from which lot of derived classes are going to be created. Now my problem is to identify all the classes which are derived from my abstract class.This is to be done in runtime.
There is no general way to list all the classes that have been loaded. There is also no general way to list all the classes that are available to be loaded.
When I say "general", I mean applicable to all ClassLoaders. A specific ClassLoader might provide either or both of those facilities. Alternatively, if you know the mechanism used by the ClassLoader (e.g. reading class files and Jars from the classpath), you could make a parallel implementation of this that could discover all the available classes.
If you can get a list of all loaded and/or available classes, the Reflection API will easily allow you to see which one(s) derive from any class or interface. [ July 16, 2007: Message edited by: Peter Chase ]
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.