move hashCode method to native method
[IRC.git] / Robust / src / ClassLibrary / JavaThread / Object.java
1 public class Object {
2   public int cachedCode;   //first field has to be a primitive
3   public boolean cachedHash;
4
5   private Object nextlockobject;
6   private Object prevlockobject;
7
8   // temporary extra unused int filed to align objects for Java
9   int wkhqwemnbmwnb;
10
11   public native int hashCode();
12
13   /* DON'T USE THIS METHOD UNLESS NECESSARY */
14   /* WE WILL DEPRECATE IT AS SOON AS INSTANCEOF WORKS */
15   public native int getType();
16
17   public native int MonitorEnter();
18   public native int MonitorExit();
19
20   public String toString() {
21     return "Object"+hashCode();
22   }
23
24   public boolean equals(Object o) {
25     if (o==this)
26       return true;
27     return false;
28   }
29 }