Is there a way to enumerate classes which have been loaded, which are derived from X or which implement interface Y?
My best shot is to do something like:
(1) Assume it is Sun J2 and enumerate all classes using the approach shown at http://www.javaworld.com/javaworld/javaqa/2003-07/02-qa-0725-classsrc2.html
where you snoop the ClassLoader private Vector of classes.
(2) Use the instanceof operator on each to find the classes.
Is there something less brutal and more efficient? I can live without portability, but that would be nice too.