1 // Object.java - The root of all evil.
3 /* Copyright (C) 1998, 1999, 2000 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
14 * @author Tom Tromey <tromey@cygnus.com>
15 * @date September 30, 1998
18 /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
19 * "The Java Language Specification", ISBN 0-201-63451-1
20 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
21 * plus gcj compiler sources (to determine object layout)
22 * Status: Complete to version 1.1
27 // This must come first. See _JvObjectPrefix in Object.h.
28 protected void finalize () throws Throwable
32 public final native Class
getClass ();
33 public native int hashCode ();
34 public final native void notify ();
35 public final native void notifyAll ();
36 public final native void wait (long timeout
, int nanos
)
37 throws InterruptedException
;
39 public boolean equals (Object obj
)
48 public String
toString ()
50 return getClass().getName() + '@' + Integer
.toHexString(hashCode());
53 public final void wait () throws InterruptedException
58 public final void wait (long timeout
) throws InterruptedException
63 protected native Object
clone () throws CloneNotSupportedException
;
65 // This initializes the sync_info member. It is here for
66 // completeness (some day we'll be able to auto-generate Object.h).
67 private final native void sync_init ();
69 // Note that we don't mention the sync_info field here. If we do,
70 // jc1 will not work correctly.