Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » IType -> x.class
IType -> x.class [message #156291] Wed, 28 April 2004 04:12 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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

Previous Topic:Request focus to eclipse
Next Topic:setting ANT command line options in 3.0 M8
Goto Forum:
  


Current Time: Wed Apr 16 14:15:56 EDT 2025

Powered by FUDForum. Page generated in 0.06364 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top