Jump to content
  • Advertisement
Sign in to follow this  
PixolMaster

[java] Printing/getting a package's class list

This topic is 4725 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I've been trying to find a way to get a class list from a package. Perhaps just an array containing strings such as: projectname.ui projectname.ui.LaunchPanel projectname.ui.LaunchPanel.AppManager projectname.ui.Login ... ... I can't seem to find a way to do so within Java. Is this possible without using IO to read all of the class files directly? Thanks very much for your time. Any help would be greatly appreciated. -- Alex Broadwin

Share this post


Link to post
Share on other sites
Advertisement
It's a good question.
I searched quickly in the javadoc and on google and i couldn't find anything. There is a Package class but you can't get any Class information from it.
I looked in the source code of the java library (Class, ClassLoader and package). The juicy bits (how is found/loaded a class depending on it's package) is hidden in the native part of java so there is not even a way of using hidden/private methods.

Why do you use it for anyway? There should be another way to do what you want.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!