Re: Using Reflection to get all Classes?



Julian wrote:

I'm currently writing a Java-Application that is supposed to offer a
sort of Class Browser (similar to the Smalltalk Class Browser).

I understood the necessarity of Reflections. It's easy to get a Class
with a known name (like: Class c = Class.forName(knownName);)
But I would like to create a Class Browser that shows all classes that
are available in the system. Is this possible? If it is, how?

Using reflection it is possible to get a list of all *loaded* classes from the classloader.
Not nice, but it is possible.
.