--- a/jdk/src/share/classes/java/lang/Class.java Wed Sep 11 15:29:41 2013 +0900
+++ b/jdk/src/share/classes/java/lang/Class.java Wed Sep 11 09:45:52 2013 +0200
@@ -821,6 +821,10 @@
* <p> If this object represents a primitive type or void, the method
* returns an array of length 0.
*
+ * <p> If this {@code Class} object represents an array type, the
+ * interfaces {@code Cloneable} and {@code java.io.Serializable} are
+ * returned in that order.
+ *
* @return an array of interfaces implemented by this class.
*/
public Class<?>[] getInterfaces() {
@@ -1500,7 +1504,7 @@
* <p> If this {@code Class} object represents an array type, a primitive
* type, or void, then this method returns an array of length 0.
*
- * <p> The elements in the array returned are not sorted and are not in any
+ * <p> The elements in the returned array are not sorted and are not in any
* particular order.
*
* @return the array of {@code Field} objects representing the
@@ -1525,23 +1529,33 @@
/**
- * Returns an array containing {@code Method} objects reflecting all
- * the public <em>member</em> methods of the class or interface represented
- * by this {@code Class} object, including those declared by the class
- * or interface and those inherited from superclasses and
- * superinterfaces. Array classes return all the (public) member methods
- * inherited from the {@code Object} class. The elements in the array
- * returned are not sorted and are not in any particular order. This
- * method returns an array of length 0 if this {@code Class} object
- * represents a class or interface that has no public member methods, or if
- * this {@code Class} object represents a primitive type or void.
+ * Returns an array containing {@code Method} objects reflecting all the
+ * public methods of the class or interface represented by this {@code
+ * Class} object, including those declared by the class or interface and
+ * those inherited from superclasses and superinterfaces.
+ *
+ * <p> If this {@code Class} object represents a type that has multiple
+ * public methods with the same name and parameter types, but different
+ * return types, then the returned array has a {@code Method} object for
+ * each such method.
+ *
+ * <p> If this {@code Class} object represents a type with a class
+ * initialization method {@code <clinit>}, then the returned array does
+ * <em>not</em> have a corresponding {@code Method} object.
*
- * <p> The class initialization method {@code <clinit>} is not
- * included in the returned array. If the class declares multiple public
- * member methods with the same parameter types, they are all included in
- * the returned array.
+ * <p> If this {@code Class} object represents an array type, then the
+ * returned array has a {@code Method} object for each of the public
+ * methods inherited by the array type from {@code Object}. It does not
+ * contain a {@code Method} object for {@code clone()}.
*
- * <p> See <em>The Java Language Specification</em>, sections 8.2 and 8.4.
+ * <p> If this {@code Class} object represents a class or interface with no
+ * public methods, then the returned array has length 0.
+ *
+ * <p> If this {@code Class} object represents a primitive type or void,
+ * then the returned array has length 0.
+ *
+ * <p> The elements in the returned array are not sorted and are not in any
+ * particular order.
*
* @return the array of {@code Method} objects representing the
* public methods of this class
@@ -1553,6 +1567,8 @@
* s.checkPackageAccess()} denies access to the package
* of this class.
*
+ * @jls 8.2 Class Members
+ * @jls 8.4 Method Declarations
* @since JDK1.1
*/
@CallerSensitive
@@ -1693,7 +1709,8 @@
* method and the method being overridden would have the same
* signature but different return types.
*
- * <p> See <em>The Java Language Specification</em>, sections 8.2 and 8.4.
+ * <p> If this {@code Class} object represents an array type, then this
+ * method does not find the {@code clone()} method.
*
* @param name the name of the method
* @param parameterTypes the list of parameters
@@ -1710,6 +1727,8 @@
* s.checkPackageAccess()} denies access to the package
* of this class.
*
+ * @jls 8.2 Class Members
+ * @jls 8.4 Method Declarations
* @since JDK1.1
*/
@CallerSensitive
@@ -1815,7 +1834,7 @@
* <p> If this {@code Class} object represents an array type, a primitive
* type, or void, then this method returns an array of length 0.
*
- * <p> The elements in the array returned are not sorted and are not in any
+ * <p> The elements in the returned array are not sorted and are not in any
* particular order.
*
* @return the array of {@code Field} objects representing all the
@@ -1853,20 +1872,29 @@
/**
- * Returns an array of {@code Method} objects reflecting all the
- * methods declared by the class or interface represented by this
- * {@code Class} object. This includes public, protected, default
- * (package) access, and private methods, but excludes inherited methods.
- * The elements in the array returned are not sorted and are not in any
- * particular order. This method returns an array of length 0 if the class
- * or interface declares no methods, or if this {@code Class} object
- * represents a primitive type, an array class, or void. The class
- * initialization method {@code <clinit>} is not included in the
- * returned array. If the class declares multiple public member methods
- * with the same parameter types, they are all included in the returned
- * array.
+ *
+ * Returns an array containing {@code Method} objects reflecting all the
+ * declared methods of the class or interface represented by this {@code
+ * Class} object, including public, protected, default (package)
+ * access, and private methods, but excluding inherited methods.
+ *
+ * <p> If this {@code Class} object represents a type that has multiple
+ * declared methods with the same name and parameter types, but different
+ * return types, then the returned array has a {@code Method} object for
+ * each such method.
*
- * <p> See <em>The Java Language Specification</em>, section 8.2.
+ * <p> If this {@code Class} object represents a type that has a class
+ * initialization method {@code <clinit>}, then the returned array does
+ * <em>not</em> have a corresponding {@code Method} object.
+ *
+ * <p> If this {@code Class} object represents a class or interface with no
+ * declared methods, then the returned array has length 0.
+ *
+ * <p> If this {@code Class} object represents an array type, a primitive
+ * type, or void, then the returned array has length 0.
+ *
+ * <p> The elements in the returned array are not sorted and are not in any
+ * particular order.
*
* @return the array of {@code Method} objects representing all the
* declared methods of this class
@@ -1891,6 +1919,8 @@
*
* </ul>
*
+ * @jls 8.2 Class Members
+ * @jls 8.4 Method Declarations
* @since JDK1.1
*/
@CallerSensitive
@@ -2011,6 +2041,9 @@
* name is "<init>"or "<clinit>" a {@code NoSuchMethodException}
* is raised.
*
+ * <p> If this {@code Class} object represents an array type, then this
+ * method does not find the {@code clone()} method.
+ *
* @param name the name of the method
* @param parameterTypes the parameter array
* @return the {@code Method} object for the method of this class
@@ -2038,6 +2071,8 @@
*
* </ul>
*
+ * @jls 8.2 Class Members
+ * @jls 8.4 Method Declarations
* @since JDK1.1
*/
@CallerSensitive