Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to get the canonical name of an entity, from its Binding(Canonical name)
icon4.gif  How to get the canonical name of an entity, from its Binding [message #642053] Mon, 29 November 2010 17:10 Go to next message
Arlindo is currently offline ArlindoFriend
Messages: 33
Registered: August 2009
Member
Hi, I'm working with the interfaces that extend IBinding (e.g. ITypeBinding, IMethodBinding, etc.).

According to JLS3 §6.7., the canonical name is more "exclusive" than the qualified name.

But, how can I get the canonical name from the entity the binding represents?
For the qualified name, we have ITypeBinding.getQualifiedName()...



[Updated on: Mon, 29 November 2010 17:11]

Report message to a moderator

Re: How to get the canonical name of an entity, from its Binding [message #642072 is a reply to message #642053] Mon, 29 November 2010 18:19 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 11/29/2010 10:40 PM, Arlindo wrote:
> Hi, I'm working with the interfaces that extend IBinding (e.g.
> ITypeBinding, IMethodBinding, etc.).
>
> According to
> http://java.sun.com/docs/books/jls/third_edition/html/names. html#6.7,
> the canonical name is more "exclusive" than the qualified name.
>
> But, how can I get the canonical name from the entity the binding
> represents?
> For the qualified name, we have ITypeBinding.getQualifiedName()...

I think ITypeBinding.getQualifiedName() returns canonical names only.
Re: How to get the canonical name of an entity, from its Binding [message #642180 is a reply to message #642072] Tue, 30 November 2010 09:45 Go to previous messageGo to next message
Arlindo is currently offline ArlindoFriend
Messages: 33
Registered: August 2009
Member
Is there any way to confirm this? The documentation doesn't mention the canonical name being returned.
Re: How to get the canonical name of an entity, from its Binding [message #642312 is a reply to message #642180] Tue, 30 November 2010 18:31 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 11/30/2010 3:15 PM, Arlindo wrote:
> Is there any way to confirm this? The documentation doesn't mention the
> canonical name being returned.
Well, you are supposed to use bindings to identify stuff. They should be
unique.
Re: How to get the canonical name of an entity, from its Binding [message #642736 is a reply to message #642312] Thu, 02 December 2010 14:55 Go to previous message
Arlindo is currently offline ArlindoFriend
Messages: 33
Registered: August 2009
Member
They aren't in the sense that the same entity may have more than one qualified name (JLS3 §6.7).
Previous Topic:Java Generics Bug in Eclipse 3.6?
Next Topic:How to remove the top-bar on java editor tabs
Goto Forum:
  


Current Time: Wed Apr 24 23:34:27 GMT 2024

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

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

Back to the top