Inner classes of parameterized types were failing to resolve because the lookup name included the type parameter information.  Updated to use the constantPool name for local types and the compound name for all others.

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1599 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java b/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java
index 8d1e42c..30ace23 100644
--- a/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java
+++ b/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java
@@ -835,13 +835,27 @@
     return String.valueOf(CharOperation.concatWith(pkgParts, '.'));
   }
 
+  /** 
+   * Returns the qualified name of the binding, excluding any type parameter
+   * information.
+   */
   private String getQualifiedName(ReferenceBinding binding) {
-    if (binding.isMemberType()) {
-      return String.valueOf(CharOperation.concat(
-          binding.enclosingType().readableName(), binding.sourceName, '.'));
+    String qualifiedName = CharOperation.toString(binding.compoundName);
+    if (binding instanceof LocalTypeBinding) {
+       // The real name of a local type is its constant pool name.
+      qualifiedName = CharOperation.charToString(binding.constantPoolName());
+      qualifiedName = qualifiedName.replace('/', '.');
+    } else {
+      /*
+       * All other types have their fully qualified name as part of its compound
+       * name.
+       */
+      qualifiedName = CharOperation.toString(binding.compoundName);
     }
-
-    return CharOperation.toString(binding.compoundName);
+   
+    qualifiedName = qualifiedName.replace('$', '.');
+    
+    return qualifiedName;
   }
 
   private String getSimpleName(TypeDeclaration typeDecl) {
@@ -875,25 +889,15 @@
       return;
     }
 
-    String qname;
+    String qname = getQualifiedName(binding);
     String jclassName;
     if (binding instanceof LocalTypeBinding) {
-      char[] localName = binding.constantPoolName();
-      for (int i = 0, c = localName.length; i < c; ++i) {
-        if (localName[i] == '/' || localName[i] == '$') {
-          localName[i] = '.';
-        }
-      }
-      qname = String.valueOf(localName);
       jclassName = qname.substring(qname.lastIndexOf('.') + 1);
     } else {
-      qname = getQualifiedName(binding);
       jclassName = getSimpleName(typeDecl);
     }
 
     if (oracle.findType(qname) != null) {
-      // TODO: gname of generic types includes the type arguments, I think that
-      // this would cause inner classes to not be found.
       return;
     }