2002/03/21 01:19:33
[org.ibex.core.git] / src / org / xwt / plat / GCJ.java
diff --git a/src/org/xwt/plat/GCJ.java b/src/org/xwt/plat/GCJ.java
new file mode 100644 (file)
index 0000000..34c89ea
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL]
+package org.xwt.plat;
+
+import org.xwt.*;
+
+/** common superclass for all platforms that use GCJ to compile a native binary */
+public abstract class GCJ extends Platform {
+
+    // static references to these classes ensure that the linker will include them
+    private static Class c1 = gnu.java.locale.Calendar.class;
+    private static Class c2 = java.util.GregorianCalendar.class;
+    private static Class c3 = gnu.gcj.convert.Input_ASCII.class;
+    private static Class c4 = gnu.gcj.convert.Input_UTF8.class;
+    private static Class c5 = gnu.gcj.convert.Input_8859_1.class;
+    private static Class c6 = gnu.java.locale.LocaleInformation.class;
+    private static Class c7 = gnu.gcj.convert.Output_ASCII.class;
+
+    protected org.xwt.Weak _getWeak(Object o) { return new Java2Weak(o); }
+    private static class Java2Weak extends java.lang.ref.WeakReference implements org.xwt.Weak {
+        public Java2Weak(Object o) { super(o); }
+    }
+        
+}
+