Community
Participate
Working Groups
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.
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 "<>" and separated by ",". * Example: <code>"pkg.Outer.Inner<java.lang.String>"</code>. * </li> Olivier, Please ensure we have a test case for this.
Add test cases in ASTConverter15Test.test0069, test0070 and test0130.
Verified in 20050330-0500