Creating dynamically an IType [message #247012] |
Fri, 24 August 2007 07:59  |
Eclipse User |
|
|
|
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 #247022 is a reply to message #247018] |
Fri, 24 August 2007 15:32  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04899 seconds