Skip to main content



      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 02:52 Go to next message
Eclipse UserFriend
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 03:06 Go to previous message
Eclipse UserFriend
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: Thu Jul 03 08:28:39 EDT 2025

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

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

Back to the top