Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Obtaining supertype/interface type parameter variable type
Obtaining supertype/interface type parameter variable type [message #251905] Thu, 06 March 2008 09:14
Vadim Dmitriev is currently offline Vadim DmitrievFriend
Messages: 74
Registered: July 2009
Member
Hi!

Is there any way to get type argument variable type for
supertype/interface?
For example:
class ListWrapper< E, F, B> implements List< F >{ ... }
If IType represents ListWrapper<String, Integer, Object> is there any way
to get type of F type parameter variable of List? (In that case it should
be Integer ). I crawled a little over IType methods and the only useful
one I found was getTypeSuperInterfacesSignatures(), which returned
"QList<QF;>;". getAllSuperInterfaces() of related ITypeHierarchy returns
interfaces with variable names from interface declarations (for List it's
"E"), which is not very helpful here.
Of course the information I seek can be extracted from "QList<QF;>;"
signature, but this way looks a little complicated. Additionally, it
requires traversing interfaces/supertypes tree to find proper "variable
name"->"supertype variable name" mapping. I have hoped that there is an
easier way to do it.

I am pretty new to JDT API, hope that the question is not totally dumb.
Thank you!
Previous Topic:controlling display of javadoc shown within Eclipse
Next Topic:[3.3.2] exit code 13 with antrunner -- please help!!!!!!!
Goto Forum:
  


Current Time: Sat Jul 27 12:38:27 GMT 2024

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

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

Back to the top