summaryrefslogtreecommitdiffstats
path: root/libdvm/src
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-07-11 13:02:04 -0700
committerElliott Hughes <enh@google.com>2013-07-11 13:02:04 -0700
commitf2e59ad7786f9c80155e24f17e2c8bc63f8fb22c (patch)
tree0bc4e46c5e7d67c8b65b6b2bab394dca61f2920a /libdvm/src
parent04371b44f6fea50e0e6bb5c732e36f084f07e8a7 (diff)
downloadlibcore-f2e59ad7786f9c80155e24f17e2c8bc63f8fb22c.zip
libcore-f2e59ad7786f9c80155e24f17e2c8bc63f8fb22c.tar.gz
libcore-f2e59ad7786f9c80155e24f17e2c8bc63f8fb22c.tar.bz2
Fix Class.getMethod docs.
Bug: https://code.google.com/p/android/issues/detail?id=31485 Change-Id: Ic9693eced5d914663428375f7d4d893417ea09e6
Diffstat (limited to 'libdvm/src')
-rw-r--r--libdvm/src/main/java/java/lang/Class.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/libdvm/src/main/java/java/lang/Class.java b/libdvm/src/main/java/java/lang/Class.java
index f618b66..47addea 100644
--- a/libdvm/src/main/java/java/lang/Class.java
+++ b/libdvm/src/main/java/java/lang/Class.java
@@ -388,9 +388,11 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe
* 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 {
@@ -502,9 +504,10 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe
* 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)
@@ -578,11 +581,12 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe
* 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 {
@@ -774,14 +778,15 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe
* 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);