A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCM Java EE 6 Enterprise Architect Exam Guide
this week in the
Java in General
Using reflection to find all classes in a given package
Joined: Mar 15, 2004
Apr 11, 2005 06:22:00
Is it possible to find out all classes and/or subpackages of a given package using reflection?
Thanks in advance,
Joined: Apr 14, 2004
Apr 11, 2005 06:38:00
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.
It is sorta covered in the
JavaRanch Style Guide
subject: Using reflection to find all classes in a given package
How does autowiring work?
How to get all the classes present under one Package using reflection ?
getting all classes in a prticular packageusing reflection
Junit and Emma
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014