Title: [1378] trunk/qdox/src/main/java/com/thoughtworks/qdox/model: Restore and bundle some deprecated method from JavaMethod to ease migrations
Revision
1378
Author
rfscholte
Date
2011-10-09 04:27:03 -0500 (Sun, 09 Oct 2011)

Log Message

Restore and bundle some deprecated method from JavaMethod to ease migrations

Modified Paths

Diff

Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaMethod.java (1377 => 1378)

--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaMethod.java	2011-10-09 09:12:16 UTC (rev 1377)
+++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaMethod.java	2011-10-09 09:27:03 UTC (rev 1378)
@@ -23,9 +23,26 @@
 
 public interface JavaMethod extends JavaAnnotatedElement, JavaMember, JavaModel, JavaGenericDeclaration
 {
+    
+    // deprecated methods
+    // will be removed with QDox-2.0
 
     /**
+     * Equivalent of java.lang.reflect.Method.getGenericReturnType()
      * 
+     * @return the generic return type
+     * @since 1.12
+     * @deprecated use {@link #getReturnType()} instead, this one holds generic information
+     */
+    JavaClass getGenericReturnType();
+
+    /**
+     * @deprecated use {@link #getDeclaringClass()} instead
+     */
+    JavaClass getParentClass();
+
+    /**
+     * 
      * @return the return type
      */
     JavaClass getReturns();
@@ -131,14 +148,6 @@
     String getSourceCode();
 
     /**
-     * Equivalent of java.lang.reflect.Method.getGenericReturnType()
-     * 
-     * @return the generic return type
-     * @since 1.12
-     */
-    JavaClass getGenericReturnType();
-
-    /**
      * Equivalent of java.lang.reflect.Method.getReturnType()
      * 
      * @return the return type
@@ -171,7 +180,5 @@
      */
     List<JavaType> getParameterTypes( boolean resolve );
 
-    JavaClass getParentClass();
-
     DocletTag getTagByName( String string, boolean b );
 }
\ No newline at end of file

Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaMethodDelegate.java (1377 => 1378)

--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaMethodDelegate.java	2011-10-09 09:12:16 UTC (rev 1377)
+++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/JavaMethodDelegate.java	2011-10-09 09:27:03 UTC (rev 1378)
@@ -121,11 +121,6 @@
         return originalMethod.getExceptionTypes();
     }
 
-    public JavaClass getGenericReturnType()
-    {
-        return originalMethod.getGenericReturnType();
-    }
-
     public int getLineNumber()
     {
         return originalMethod.getLineNumber();
@@ -156,11 +151,6 @@
         return originalMethod.getParameters();
     }
     
-    public JavaClass getParentClass()
-    {
-        return originalMethod.getParentClass();
-    }
-
     public String getPropertyName()
     {
         return originalMethod.getPropertyName();
@@ -315,4 +305,19 @@
     {
         return getParameterTypes( false );
     }
+    
+    // deprecated methods
+    // will be removed with QDox-2.0
+    public JavaClass getParentClass()
+    {
+        return originalMethod.getParentClass();
+    }
+
+    public JavaClass getGenericReturnType()
+    {
+        return originalMethod.getGenericReturnType();
+    }
+
+
+
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to