Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to find the type parameters for a given superclass in the hierarchy
How to find the type parameters for a given superclass in the hierarchy [message #530719] Fri, 30 April 2010 11:44 Go to next message
Eclipse UserFriend
Hello,

Let me explain my current problem with the following exemple :
I have the following type
JAXBElementProvider extends AbstractJAXBProvider<JAXBElement<*>>

where
AbstractJAXBProvider<T> extends AbstractEntityProvider<T>

and
AbstractEntityProvider<T> implements MessageBodyReader<T>, MessageBodyWriter<T>


What I need to find from the folowing type hierarchy is that my JAXBElementProvider implements the MessageBodyReader interface with the type JAXBElement<*>

Using the IType and Signature methods, I can find the superclass/superinterfaces, extract the type arguments /type parameters, but before going into some quite complex code, I'd like to know if there's already some utility method that would return the "JAXBElement<*>" type through this hierarchy of classes/interfaces.


By the way : I don't get the difference between "type parameters", "type arguments" and "inferred types". Can anyone explain ?

Thank you in advance.
Regards,
/Xavier
Re: How to find the type parameters for a given superclass in the hierarchy [message #530723 is a reply to message #530719] Fri, 30 April 2010 12:02 Go to previous message
Eclipse UserFriend
Ok, forget about the difference between arguments and parameters, I found an answer :

    - argument are supplied by the caller,
    - parameters are local to the type or the method.


Still, any suggestion on how to simply find the type argument for a given superinterface in the hierarchy (meaning : not reinventing the wheel) is welcome Wink

Regards,
Xavier
Previous Topic:Produce ant build.xml or maven pom.xml automatically in Eclipse
Next Topic:compiler creates generated fields/methods when class switches on enum
Goto Forum:
  


Current Time: Fri Mar 21 17:05:51 EDT 2025

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

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

Back to the top