Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » IType -> x.class
IType -> x.class [message #156291] Wed, 28 April 2004 08:12 Go to next message
student is currently offline studentFriend
Messages: 6
Registered: July 2009
Junior Member
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 13: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: Sat Nov 09 03:41:56 GMT 2024

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

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

Back to the top