aspose file tools*
The moose likes Java in General and the fly likes Using reflection to find all classes in a given package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using reflection to find all classes in a given package" Watch "Using reflection to find all classes in a given package" New topic
Author

Using reflection to find all classes in a given package

Suhaasi Karnik
Greenhorn

Joined: Mar 15, 2004
Posts: 23
Hi,

Is it possible to find out all classes and/or subpackages of a given package using reflection?

Thanks in advance,
Suhaasi
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

There's no API to do it directly. However you can find out the package for a particular classs, and you can trawl through all classes in your classpath.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using reflection to find all classes in a given package