Commits

Anonymous committed 3f3fdd7 Merge

Merge "Fix Class.getMethod docs."

Comments (0)

Files changed (1)

libdvm/src/main/java/java/lang/Class.java

      * constructor matching the given parameter types.
      * {@code (Class[]) null} is equivalent to the empty array.
      *
+     * <p>See {@link #getMethod} for details of the search order.
+     * Use {@link #getDeclaredConstructor} if you don't want to search superclasses.
+     *
      * @throws NoSuchMethodException
      *             if the constructor can not be found.
-     * @see #getDeclaredConstructor(Class[])
      */
     @SuppressWarnings("unchecked")
     public Constructor<T> getConstructor(Class<?>... parameterTypes) throws NoSuchMethodException {
      * represented by this {@code Class}.
      * {@code (Class[]) null} is equivalent to the empty array.
      *
+     * <p>Use {@link #getConstructor} if you want to search superclasses.
+     *
      * @throws NoSuchMethodException
      *             if the requested constructor can not be found.
-     * @see #getConstructor(Class[])
      */
     @SuppressWarnings("unchecked")
     public Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes)
      * represented by this {@code Class}.
      * {@code (Class[]) null} is equivalent to the empty array.
      *
+     * <p>See {@link #getMethod} if you want to search superclasses.
+     *
      * @throws NoSuchMethodException
      *             if the requested method can not be found.
      * @throws NullPointerException
      *             if {@code name} is {@code null}.
-     * @see #getMethod(String, Class[])
      */
     public Method getDeclaredMethod(String name, Class<?>... parameterTypes)
             throws NoSuchMethodException {
      * Returns a {@code Method} object which represents the public method with
      * the given name and parameter types.
      * {@code (Class[]) null} is equivalent to the empty array.
-     * This method first searches the
-     * class C represented by this {@code Class}, then the superclasses of C and
-     * finally the interfaces implemented by C and finally the superclasses of C
-     * for a method with matching name.
+     *
+     * <p>This method first searches the class C represented by this {@code Class},
+     * then the superclasses of C,
+     * and finally the interfaces implemented by C and its superclasses.
+     *
+     * <p>Use {@link #getDeclaredMethod} if you don't want to search superclasses.
      *
      * @throws NoSuchMethodException
      *             if the method can not be found.
-     * @see #getDeclaredMethod(String, Class[])
      */
     public Method getMethod(String name, Class<?>... parameterTypes) throws NoSuchMethodException {
         Member member = getConstructorOrMethod(name, true, true, parameterTypes);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.