get package classes

C

Chameleon

Can I have an enumeration/vector/array or something with all classes
of a package?

I have a class script.Compile and I want this class enumerate all
classes inside package script.functions

I try class "Package" but I cannot found a method like "getClasses()" or
"getClassesNames()"
 
T

Tor Iver Wilhelmsen

Chameleon said:
Can I have an enumeration/vector/array or something with all classes
of a package?

No: Packages do not exist as "objects", since a class in a package can
be anywhere on the classpath. The VM only knows about the classes that
have been loaded.

You can roll your own scanner of the classpath of course.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top