aspose file tools
The moose likes Java in General and the fly likes introspection of child classes given a package name Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "introspection of child classes given a package name" Watch "introspection of child classes given a package name" New topic
Author

introspection of child classes given a package name

jason white
Ranch Hand

Joined: Aug 08, 2005
Posts: 60
Here is a strange problem that I don't know how to solve:

Given a package name: "com.foo" find all objects within that package.

I have looking in javax.naming, Class, ClassLoader...not sure where to go...

I feel like there is probably a simple answer but no one seems to know it...

-jason
scea, scwcd, scbcd, scjp, mcp
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
No, I don't think there's any simple way to do that.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
jason white
Ranch Hand

Joined: Aug 08, 2005
Posts: 60
moderator, can you point me in the right direction on this maybe?

-jason
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35232
    
    7
You can take the classpath, iterate through all the directories in it and see what you find. All zip and jar file files in it need to be opened and inspected as well. Like Peter says, there is no ready-made API for this.
[ March 24, 2006: Message edited by: Ulf Dittmer ]

Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: introspection of child classes given a package name
 
Similar Threads
Please review Server design
Why does this program start from 60 bottles of Beer and not 99
My Question SCJP
"reverse engineered" package name?
package and classpath