|
Using the Java Hierarchy programmatically -
10-19-2009, 09:54 AM
hello,
I am creating a plugin which allows the creation of specific JAVA projects. The specificity of the plugin is to automatically create some domain classes (code generation) according to some rules (described in an XML file)
To do that, I have created a different abstract classes (a set of MySpecificClass) that derives from a class MyAbstractClass. Each rule will create a class that derives from a MySpecificClass sot he user will be able to write the very specific stuff
Anyway, this is the context.
Before knowing which class my rule engine can automatically create, I'd like to know which MySpecificClass are in my classpath (they may be in different jars)
So, I'd like to access a kind of java.util.Collection of classes. to process it programmatically
I suppose I can reuse the Hierarchy view facility. I have debugged my eclipse app, made a hierarchy query (F4) and breakpointed a bit. I found that the pivot class is the CreateTypeHierarchyOperation. Unfortunatelly, it is internal.
Do you think this is the only method? Do you have a code snippet to do that?
|