groovy git commit: Refine `getGroovydoc` DGMs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

groovy git commit: Refine `getGroovydoc` DGMs

Daniel.Sun
Repository: groovy
Updated Branches:
  refs/heads/master ec49133c5 -> 86eb9dd7d


Refine `getGroovydoc` DGMs


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/86eb9dd7
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/86eb9dd7
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/86eb9dd7

Branch: refs/heads/master
Commit: 86eb9dd7d64188ab0847697ea57dede3d2190246
Parents: ec49133
Author: sunlan <[hidden email]>
Authored: Sun Sep 10 20:42:22 2017 +0800
Committer: sunlan <[hidden email]>
Committed: Sun Sep 10 20:42:22 2017 +0800

----------------------------------------------------------------------
 .../groovy/runtime/DefaultGroovyMethods.java    | 35 ++------------------
 1 file changed, 2 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/86eb9dd7/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
index 9f99021..b4dae13 100644
--- a/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
+++ b/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
@@ -117,8 +117,8 @@ import java.io.Reader;
 import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -18884,44 +18884,13 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
         return self.remove(o);
     }
 
-
-    /**
-     * Get runtime groovydoc
-     * @param holder the groovydoc hold
-     * @return runtime groovydoc
-     * @since 2.6.0
-     */
-    public static String getGroovydoc(Class<?> holder) {
-        return holder.<Groovydoc>getAnnotation(Groovydoc.class).value();
-    }
-
-    /**
-     * Get runtime groovydoc
-     * @param holder the groovydoc hold
-     * @return runtime groovydoc
-     * @since 2.6.0
-     */
-    public static String getGroovydoc(Method holder) {
-        return holder.<Groovydoc>getAnnotation(Groovydoc.class).value();
-    }
-
-    /**
-     * Get runtime groovydoc
-     * @param holder the groovydoc hold
-     * @return runtime groovydoc
-     * @since 2.6.0
-     */
-    public static String getGroovydoc(Constructor holder) {
-        return ((Groovydoc) holder.<Groovydoc>getAnnotation(Groovydoc.class)).value();
-    }
-
     /**
      * Get runtime groovydoc
      * @param holder the groovydoc hold
      * @return runtime groovydoc
      * @since 2.6.0
      */
-    public static String getGroovydoc(Field holder) {
+    public static String getGroovydoc(AnnotatedElement holder) {
         return holder.<Groovydoc>getAnnotation(Groovydoc.class).value();
     }
 }