fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / libjava / java / lang / Object.java
blobc644f7c3c87b32c85a1f92be4a0c784e4df5bdda
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
9 details. */
11 package java.lang;
13 /**
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
25 public class Object
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)
41 return this == obj;
44 public Object ()
48 public String toString ()
50 return getClass().getName() + '@' + Integer.toHexString(hashCode());
53 public final void wait () throws InterruptedException
55 wait (0, 0);
58 public final void wait (long timeout) throws InterruptedException
60 wait (timeout, 0);
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.