File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
How to get all the classes present under one Package using reflection ?
getting all classes in a prticular packageusing reflection
Reflection
Junit and Emma
How does autowiring work?