Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Creating dynamically an IType
Creating dynamically an IType [message #247012] Fri, 24 August 2007 07:59 Go to next message
Eclipse UserFriend
Originally posted by: Rudolf.Ziegaus.gmx.de

Hello,

during my processing of a class (code analysis) I encounter a name for a
interface the class implements. Unfortunately the class just gives me (via
IType) the name of the interface in a string form (e. g.
"java.lang.comparable").

I'd like to create a corresponding IType from this string to be able to
further investigate this interface, that is, which methods it contains.

Of course I could create the corresponding class via reflection and so the
analysis on this base, but I'd prefer to stick to the mechanismen of
Eclipse.

Hope you can give me some hints.

TIA,

Rudi
Re: Creating dynamically an IType [message #247018 is a reply to message #247012] Fri, 24 August 2007 08:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benno_baumgartner.ch.ibm.com

Rudolf Ziegaus wrote:
> Hello,
>
> during my processing of a class (code analysis) I encounter a name for a
> interface the class implements. Unfortunately the class just gives me (via
> IType) the name of the interface in a string form (e. g.
> "java.lang.comparable").
>
> I'd like to create a corresponding IType from this string to be able to
> further investigate this interface, that is, which methods it contains.
>
> Of course I could create the corresponding class via reflection and so the
> analysis on this base, but I'd prefer to stick to the mechanismen of
> Eclipse.
>
> Hope you can give me some hints.
>
> TIA,
>
> Rudi

See org.eclipse.jdt.core.IJavaProject.findType(String)

HTH
Benno
Re: Creating dynamically an IType [message #247022 is a reply to message #247018] Fri, 24 August 2007 15:32 Go to previous message
Eclipse UserFriend
Originally posted by: Rudolf.Ziegaus.gmx.de

Am Fri, 24 Aug 2007 14:13:41 +0200 schrieb Benno Baumgartner:

> Rudolf Ziegaus wrote:
>> Hello,
>>
>> during my processing of a class (code analysis) I encounter a name for a
>> interface the class implements. Unfortunately the class just gives me (via
>> IType) the name of the interface in a string form (e. g.
>> "java.lang.comparable").
>>
>> I'd like to create a corresponding IType from this string to be able to
>> further investigate this interface, that is, which methods it contains.
>>
>> Of course I could create the corresponding class via reflection and so the
>> analysis on this base, but I'd prefer to stick to the mechanismen of
>> Eclipse.
>>
>> Hope you can give me some hints.
>>
>> TIA,
>>
>> Rudi
>
> See org.eclipse.jdt.core.IJavaProject.findType(String)
>
> HTH
> Benno

Thanks a lot, that is just what I was looking for!

Rudi
Previous Topic:Content assist : show non-inherited methods only
Next Topic:Launching Framework / ClassLoader
Goto Forum:
  


Current Time: Fri Jul 18 09:47:00 EDT 2025

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

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

Back to the top