Title: [1354] trunk/qdox/src/main/java/com/thoughtworks/qdox/model/Type.java: Let static methods of Type use JavaType instead of Type
Revision
1354
Author
rfscholte
Date
2011-10-02 10:36:55 -0500 (Sun, 02 Oct 2011)

Log Message

Let static methods of Type use JavaType instead of Type

Modified Paths


Diff

Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/Type.java (1353 => 1354)

--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/Type.java	2011-10-02 15:32:59 UTC (rev 1353)
+++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/Type.java	2011-10-02 15:36:55 UTC (rev 1354)
@@ -504,7 +504,7 @@
         return result.toString();
     }
 
-    protected static <D extends JavaGenericDeclaration> String getResolvedGenericValue( Type base, List<TypeVariable<D>> typeParameters )
+    protected static <D extends JavaGenericDeclaration> String getResolvedGenericValue( JavaType base, List<TypeVariable<D>> typeParameters )
     {
         StringBuffer result = new StringBuffer();
         TypeVariable<?> variable = resolve( base, typeParameters );
@@ -522,14 +522,17 @@
             }
             result.append( ">" );
         }
-        for ( int i = 0; i < base.getDimensions(); i++ )
+        if( base instanceof JavaClass )
         {
-            result.append( "[]" );
+            for ( int i = 0; i < ( (JavaClass) base ).getDimensions(); i++ )
+            {
+                result.append( "[]" );
+            }
         }
         return result.toString();
     }
 
-    protected static <D extends JavaGenericDeclaration> String getResolvedGenericFullyQualifiedName( Type base, List<TypeVariable<D>> typeParameters )
+    protected static <D extends JavaGenericDeclaration> String getResolvedGenericFullyQualifiedName( JavaType base, List<TypeVariable<D>> typeParameters )
     {
         StringBuffer result = new StringBuffer();
         TypeVariable<D> variable = resolve( base, typeParameters );
@@ -547,14 +550,17 @@
             }
             result.append( ">" );
         }
-        for ( int i = 0; i < base.getDimensions(); i++ )
+        if ( base instanceof JavaClass )
         {
-            result.append( "[]" );
+            for ( int i = 0; i < ( (JavaClass) base ).getDimensions(); i++ )
+            {
+                result.append( "[]" );
+            }
         }
         return result.toString();
     }
 
-    protected static <D extends JavaGenericDeclaration> String getResolvedFullyQualifiedName( Type base, List<TypeVariable<D>> typeParameters )
+    protected static <D extends JavaGenericDeclaration> String getResolvedFullyQualifiedName( JavaType base, List<TypeVariable<D>> typeParameters )
     {
         TypeVariable<D> variable = resolve( base, typeParameters );
         return (variable == null ? base.getFullyQualifiedName() : variable.getBounds().get(0).getFullyQualifiedName() );


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to