Bug 342475 - ITypeBinding.getQualifiedName() returns a generic signature
Summary: ITypeBinding.getQualifiedName() returns a generic signature
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 13:29 EDT by Pascal Filion CLA
Modified: 2011-04-25 02:14 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Filion CLA 2011-04-11 13:29:03 EDT
I have a ITypeBindng for java.util.List, which was retrieved for a class field type: "private List<Employee> employees".

The ITypeBindings for the interfaces java.util.List extend does not return the non-generic fully qualified name. ITypeBinding.getQualifiedName() returns java.util.Collection<E> for the ITypeBinding of java.util.Collection. However the Javadoc says: "Note that the type parameters of a generic type are not included". Is the return value wrong or is the Javadoc wrong?
Comment 1 Ayushman Jain CLA 2011-04-12 03:01:13 EDT
Since here using a parameterized type reference to find the ITypeBinding, the javadoc clearly says "For type bindings that correspond to particular instances of a generic type arising from a parameterized type reference, the fully qualified name is the fully qualified name of the erasure type followed by the fully qualified names of the type arguments surrounded by "<>" and separated by ",". Example: "java.util.Collection<java.lang.String>"

So i think this is correct.
Comment 2 Pascal Filion CLA 2011-04-12 09:29:08 EDT
Thanks for the information.
Comment 3 Ayushman Jain CLA 2011-04-12 10:56:28 EDT
Closing as invalid.
Comment 4 Srikanth Sankaran CLA 2011-04-25 02:14:04 EDT
Verified for 3.7 M7