Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Find if a method overrides a method belonging in a library or the java api
Find if a method overrides a method belonging in a library or the java api [message #643228] Mon, 06 December 2010 07:52 Go to next message
Katerina Xristopoulou is currently offline Katerina XristopoulouFriend
Messages: 2
Registered: November 2010
Junior Member
Hello all!

I am a newbie in jdt, and i would to like to find out if there is a way to specify whether a method is overriding another one belonging to a class of the java api or of a library, assuming that the code doesn't contain @override annotation.

Can i somehow use

JavaModelUtil.findInCompilationUnit(ICompilationUnit, IJavaElement)

with the superclass and the method as parameters, to find out if the method is also declared in the superclass, or is there another way?

Thank you very much!

Kat
Re: Find if a method overrides a method belonging in a library or the java api [message #643229 is a reply to message #643228] Mon, 06 December 2010 08:06 Go to previous message
Katerina Xristopoulou is currently offline Katerina XristopoulouFriend
Messages: 2
Registered: November 2010
Junior Member
Seems as though i was looking at the wrong direction to find it Rolling Eyes !

I think that with

Bindings.findOverriddenMethod(methodBinding, true);

will do! Razz

Thanks a lot!
Previous Topic:problem Of Perm Gen Space
Next Topic:Performance Issues: IType - newTypeHierarchy(...)
Goto Forum:
  


Current Time: Sun Nov 23 02:27:05 GMT 2014

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

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