• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using reflection to find all classes in a given package

 
Suhaasi Karnik
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic