From a0993e23650fde7d39ce6cd8033ef46d19303d69 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 20 Feb 2007 08:52:29 +0000 Subject: [PATCH] another file --- Robust/src/ClassLibrary/ObjectJava.java | 20 ++++++++++++++++++++ Robust/src/ClassLibrary/Thread.java | 13 +++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 Robust/src/ClassLibrary/ObjectJava.java create mode 100644 Robust/src/ClassLibrary/Thread.java diff --git a/Robust/src/ClassLibrary/ObjectJava.java b/Robust/src/ClassLibrary/ObjectJava.java new file mode 100644 index 00000000..89d8686d --- /dev/null +++ b/Robust/src/ClassLibrary/ObjectJava.java @@ -0,0 +1,20 @@ +public class Object { + public native int hashCode(); + + /* DON'T USE THIS METHOD UNLESS NECESSARY */ + /* WE WILL DEPRECATE IT AS SOON AS INSTANCEOF WORKS */ + public native int getType(); + + public native int MonitorEnter(); + public native int MonitorExit(); + + public String toString() { + return String.valueOf(this); + } + + public boolean equals(Object o) { + if (o==this) + return true; + return false; + } +} diff --git a/Robust/src/ClassLibrary/Thread.java b/Robust/src/ClassLibrary/Thread.java new file mode 100644 index 00000000..b9f2a822 --- /dev/null +++ b/Robust/src/ClassLibrary/Thread.java @@ -0,0 +1,13 @@ +public class Thread { + public void start() { + nativeCreate(); + } + + private static void staticStart(Thread t) { + t.run(); + } + + public void run() {} + + private native void nativeCreate(); +} -- 2.34.1