Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Retrieving, instantiating an IType

I'd like to go from a fully-qualified class name and retrieve an object of type IType. The class name could be any class within the classpath, or any Java class in any project. The class name is supplied as a string. What's the easiest way to get that? I was looking through the SearchEngine class, but I'm not sure what to supply for a progress monitor etc... I'm not looking to use this with the UI.

After retrieving an IType, I'd like to instantiate an object of that type. Should I go through the java reflection api, or is there some proper Eclipse way of doing this that I'm not aware of?

--
Liam Morley
Computer Science Undergraduate
Worcester Polytechnic Institute



Back to the top