Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] a question for IType


As noted at http://www.eclipse.org/mail/, the jdt-code-dev email list is intended mainly for internal discussions by the developers who are working on JDT/Core.  If you have questions about how to use Eclipse, the Eclipse newsgroups are the best place to ask, because many more people read and can respond, and because any answers you get will be available to people in the future.  You can access the newsgroups from http://www.eclipse.org/newsgroups/ .

For your question, resolved information inside a compilation unit can be accessed using a DOM AST. To obtain a DOM AST, use org.eclipse.jdt.core.dom.ASTParser and
ASTParser.setResolveBindings(true). >From the binding of the method you will be able to get to the binding of the returned type.

If you need more help in using the DOM AST, please first have a look at the Help.

Jerome



From: "serfire wang" <serfire@xxxxxxxxx>
To: jdt-core-dev@xxxxxxxxxxx
Date: 28/11/2008 03:21 AM
Subject: [jdt-core-dev] a question for IType
Sent by: jdt-core-dev-bounces@xxxxxxxxxxx









Hi

I want to judge whether the Class of the return type of a method in source code editor is java.util.Map .

I can get the the selected method , that is a IMethod type.

but in IMethod , there is maybe only one available method : IMethod.getReturnType()

this method just return a String , how can I get the real class from a IMethod instance.  

thanks a lot


_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev




Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : Tour Descartes, 2, avenue Gambetta, La Défense 5, 92400 Courbevoie
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 590.751.786,90 €
SIREN/SIRET : 552 118 465 02430


Back to the top