Bug 83770

Summary: [1.5] ITypeBinding getQualifiedName doesn't cover the case of parameterized member type
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 3.1   
Target Milestone: 3.1 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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