• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to load classes for a particular package  RSS feed

 
yogesh seth
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a package name say com.test
i need to get the names of all the classes starting with "Test" under this package. Also, i need to get the names of all the methods starting with "test" in each of these classes.

ideas/suggestions welcome

cheers
yogesh
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This comes up every once in a while. I think the only solution is to find the classes on disk - in a jar or directory - and list them there.

One package could come from two or more places. At work we have one directory for application classes, and another directory with exactly the same package names for tests. I suppose the same thing could happen with jars.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!