15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang;
27
28 /**
29 * Class {@code Object} is the root of the class hierarchy.
30 * Every class has {@code Object} as a superclass. All objects,
31 * including arrays, implement the methods of this class.
32 *
33 * @author unascribed
34 * @see java.lang.Class
35 * @since JDK1.0
36 */
37 public class Object {
38
39 private static native void registerNatives();
40 static {
41 registerNatives();
42 }
43
44 /**
45 * Returns the runtime class of this {@code Object}. The returned
46 * {@code Class} object is the object that is locked by {@code
47 * static synchronized} methods of the represented class.
48 *
49 * <p><b>The actual result type is {@code Class<? extends |X|>}
50 * where {@code |X|} is the erasure of the static type of the
51 * expression on which {@code getClass} is called.</b> For
52 * example, no cast is required in this code fragment:</p>
53 *
54 * <p>
55 * {@code Number n = 0; }<br>
|
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang;
27
28 /**
29 * Class {@code Object} is the root of the class hierarchy.
30 * Every class has {@code Object} as a superclass. All objects,
31 * including arrays, implement the methods of this class.
32 *
33 * @author unascribed
34 * @see java.lang.Class
35 * @since 1.0
36 */
37 public class Object {
38
39 private static native void registerNatives();
40 static {
41 registerNatives();
42 }
43
44 /**
45 * Returns the runtime class of this {@code Object}. The returned
46 * {@code Class} object is the object that is locked by {@code
47 * static synchronized} methods of the represented class.
48 *
49 * <p><b>The actual result type is {@code Class<? extends |X|>}
50 * where {@code |X|} is the erasure of the static type of the
51 * expression on which {@code getClass} is called.</b> For
52 * example, no cast is required in this code fragment:</p>
53 *
54 * <p>
55 * {@code Number n = 0; }<br>
|