Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Retrieve superclass or interface which declares a method
icon5.gif  Retrieve superclass or interface which declares a method [message #648940] Sat, 15 January 2011 20:46 Go to next message
Christophe Bismuth is currently offline Christophe Bismuth
Messages: 67
Registered: July 2009
Location: Paris, France
Member

Hi,

I have an IMethodBinding object, is there any way to retrieve the superclass or the interface this method overrides/implements?

Thanks,
Chris
Re: Retrieve superclass or interface which declares a method [message #648981 is a reply to message #648940] Mon, 17 January 2011 04:01 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak Azad
Messages: 545
Registered: July 2009
Senior Member
On 1/16/2011 2:16 AM, Christophe Bismuth wrote:
> Hi,
>
> I have an IMethodBinding object, is there any way to retrieve the
> superclass or the interface this method overrides/implements?
>
> Thanks,
> Chris
Get the declaring class :IMethodBinding.getDeclaringClass(), and then
search for the method in its hierarchy, see
SearchEngine.createHierarchyScope(IType)
icon3.gif  Re: [SOLVED] Retrieve superclass or interface which declares a method [message #649029 is a reply to message #648981] Mon, 17 January 2011 10:56 Go to previous message
Christophe Bismuth is currently offline Christophe Bismuth
Messages: 67
Registered: July 2009
Location: Paris, France
Member

Thank you Deepak,

I didn't think about searching into the hierarchy scope, that's great hint!

Chris
Previous Topic:Tomorrow's Tech Today: HTML 5 by Scott Davis at GIDS 2011
Next Topic:ASTRequestor to remove MethodDeclaration nodes
Goto Forum:
  


Current Time: Mon Oct 20 13:17:21 GMT 2014

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

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