| 
| IType -> x.class [message #156291] | Wed, 28 April 2004 04:12  |  | 
| Eclipse User  |  |  |  |  | Hi! 
 I have to implement a method, that automatically adds all classes in a
 package, whose name ends with "tests".
 Well, I already implemented that.
 
 My problem is, that through JDT I receive an array of IType objects.
 I need to "convert" IType to java.lang.Class because the suite.addTestSuite
 method need a java.lang.Class type as parameter.
 
 So if I f.i. have a class called "PatternTest" as IType. How can I get the
 PatternTest.class ?
 
 
 Thank you very much in advance.
 
 N.T.
 |  |  |  | 
| 
| Re: IType -> x.class [message #156321 is a reply to message #156291] | Wed, 28 April 2004 09:58  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: richkulp.NO.SPAM.us.ibm.com 
 You can't. The JDT and ITypes run in the IDE, in the IDE you don't have
 access to the Class objects because you don't ever load classes from
 projects into the IDE. If you did that then if you change the java
 files, you won't be able to see the changed classes, unless you do some
 trickery with classloaders.
 
 --
 Thanks, Rich Kulp
 
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04314 seconds