Bug 83770 - [1.5] ITypeBinding getQualifiedName doesn't cover the case of parameterized member type
Summary: [1.5] ITypeBinding getQualifiedName doesn't cover the case of parameterized m...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-26 17:07 EST by Olivier Thomann CLA
Modified: 2005-03-30 22:53 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2005-01-26 17:07:06 EST
In a case where you have a parameterized nested type, the getQualifiedName()
spec doesn't return a qualified part for the member type.
It says:
	 * <li>For members of top-level types, the fully qualified name is the
	 * simple name of the type preceded by the fully qualified name of the
	 * enclosing type (as computed by this method) and a ".".
	 * Example: <code>"java.io.ObjectInputStream.GetField"</code>.</li>

This means that:
A<String>.B<Integer> where A is in package p has a qualified name equals to:
p.A<java.lang.String>.B<Integer> instead of the intuitive result:
p.A<java.lang.String>.B<java.lang.Integer>

I believe this is a bug in the spec. In case of a parameterized member types,
the  type arguments should be fully qualified. If the member type is not
parameterized, the spec is fine.
Comment 1 Jim des Rivieres CLA 2005-02-24 18:29:38 EST
Released improved spec:

 * <li>For members of top-level types, the fully qualified name is the
 * simple name of the type preceded by the fully qualified name of the
 * enclosing type (as computed by this method) and a ".".
 * Example: <code>"java.io.ObjectInputStream.GetField"</code>.
 * If the binding if for a member type that corresponds to a particular 
instance
 * of a generic type arising from a parameterized type reference, the simple
 * name of the type is followed by the fully qualified names of the type 
arguments
 * (as computed by this method) surrounded by "&lt;&gt;" and separated by ",".
 * Example: <code>"pkg.Outer.Inner&lt;java.lang.String&gt;"</code>.
 * </li>

Olivier, Please ensure we have a test case for this.
Comment 2 Olivier Thomann CLA 2005-02-25 14:13:46 EST
Add test cases in ASTConverter15Test.test0069, test0070 and test0130.
Comment 3 Olivier Thomann CLA 2005-03-30 22:53:04 EST
Verified in 20050330-0500