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 12:10 Go to next message
Arlindo is currently offline Arlindo
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 12: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 13:19 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak Azad
Messages: 545
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 04:45 Go to previous messageGo to next message
Arlindo is currently offline Arlindo
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 13:31 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak Azad
Messages: 545
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 09:55 Go to previous message
Arlindo is currently offline Arlindo
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: Tue Jul 29 00:49:06 EDT 2014

Powered by FUDForum. Page generated in 0.01941 seconds