Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » finding the implementing interfaces of an IType
finding the implementing interfaces of an IType [message #99132] Fri, 26 September 2003 08:14 Go to next message
Eclipse UserFriend
Hi,

Suppose I have an instance of IType. I want to get the list of immediate
interfaces it implements. I found there are two options -
1. use IType#getSuperInterfaceNames() and then IType#resolveType()
2. use IType#newSupertypeHierarchy() and then
ITypeHierarchy#getSuperInterfaces

I found that these methods are too slow for me, because I invoke them on
almost all files in a java project.

Can anybody provide an insight on how to do perform this operation most
efficiently?

Thanks,
Genady
Re: finding the implementing interfaces of an IType [message #99213 is a reply to message #99132] Fri, 26 September 2003 09:42 Go to previous message
Eclipse UserFriend
You could build the type hierarchy once on the Java project using
IJavaProject.newTypeHierarchy(IRegion, IProgressMonitor) passing in a region
that contains the whole project. This will resolve the super types of all
types in the region only once.

Jerome

"Genady" <eclipse@genady.org> wrote in message
news:bl1ah2$fef$1@eclipse.org...
> Hi,
>
> Suppose I have an instance of IType. I want to get the list of immediate
> interfaces it implements. I found there are two options -
> 1. use IType#getSuperInterfaceNames() and then IType#resolveType()
> 2. use IType#newSupertypeHierarchy() and then
> ITypeHierarchy#getSuperInterfaces
>
> I found that these methods are too slow for me, because I invoke them on
> almost all files in a java project.
>
> Can anybody provide an insight on how to do perform this operation most
> efficiently?
>
> Thanks,
> Genady
>
Previous Topic:Ctrl+O extremally slow in I20030925
Next Topic:Source not found for RemoteTestRunner.run() line: 277
Goto Forum:
  


Current Time: Thu Jul 03 08:00:18 EDT 2025

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

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

Back to the top