Results 1 to 1 of 1
Thread: Get name of available classes
- 07-26-2008, 01:03 PM #1Member
- Join Date
- Jul 2008
- Rep Power
Get name of available classes
I'm not sure i that's the right category for my question, if not maybe someone can move it, sorry 'bout that.
I'm currently working on a SUNSpots project. And i'm wondering if it's in general possible to get at runtime the classes(or at least the names of the classes) belonging to a package.
So my scenario:
I got a package ('moves' for example) containig an interface and some classes implementing that interface, e.g. 'MoveRight', 'MoveLeft' etc.
Now i want to know if it's possible to implement a method that just returns me all the names of the classes in the package 'moves'. I saw an example for Java1.5, that worked with the classloader and read all files from a resource (the subdirectory). But afaik there's no way in JavaME to access the classloader.
Anyone got an idea how to solve my problem?
- By Assaf A in forum EclipseReplies: 1Last Post: 04-22-2008, 03:31 PM
- By freswood in forum New To JavaReplies: 5Last Post: 04-21-2008, 04:28 PM
- By Joe2003 in forum Advanced JavaReplies: 1Last Post: 01-02-2008, 08:08 PM
- By sireesha in forum New To JavaReplies: 5Last Post: 12-11-2007, 10:45 PM
- By cruxblack in forum New To JavaReplies: 5Last Post: 08-10-2007, 06:00 PM