How to get a list of loaded classes.
1 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Friday, June 15, 2001 12:22 AM

To get a list of versions, we would like to query all loaded classes for a specific method or field that holds the version information.

Now if we have a list of loaded classes we can use RTTI to get the specific methods or fiels if we have the class reference, but the problem is getting this list.

Is there a way to get a list of loaded classes, or alternatively a list of active classLoaders?



Re: How to get a list of loaded classes.

Posted By:   Luigi_Viggiano  
Posted On:   Friday, June 15, 2001 03:15 AM

I'm not aware about any method to get the list of all loaded classes or all ClassLoaders (that means all classes extending from ClassLoader).
I think: if a pluggable application is made able to lookup all classes (then to instantiate, and invoke methods) it would compromise security of other running apps in the same virtual machine, so I don't think it's possible, due to security limitation.
Of course, if you define your own ClassLoader, it can do whatever you want (even to list everything) but just with its loaded classes.
About | Sitemap | Contact