|
From: <ls...@us...> - 2007-08-11 19:54:17
|
Revision: 3389
http://jnode.svn.sourceforge.net/jnode/?rev=3389&view=rev
Author: lsantha
Date: 2007-08-11 12:54:16 -0700 (Sat, 11 Aug 2007)
Log Message:
-----------
Openjdk integration.
Modified Paths:
--------------
trunk/core/src/core/org/jnode/vm/VmSystem.java
Modified: trunk/core/src/core/org/jnode/vm/VmSystem.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmSystem.java 2007-08-11 19:53:05 UTC (rev 3388)
+++ trunk/core/src/core/org/jnode/vm/VmSystem.java 2007-08-11 19:54:16 UTC (rev 3389)
@@ -68,6 +68,8 @@
import org.vmmagic.unboxed.Extent;
import org.vmmagic.unboxed.ObjectReference;
import org.vmmagic.unboxed.Offset;
+import sun.reflect.annotation.AnnotationType;
+import sun.nio.ch.Interruptible;
/**
* System support for the Virtual Machine
@@ -166,9 +168,38 @@
final ConsoleAppender infoApp = new ConsoleAppender(
new PatternLayout(LAYOUT));
root.addAppender(infoApp);
+
+ initOpenJDKSpeciffics();
}
}
+ private static void initOpenJDKSpeciffics() {
+ //todo this will be moved to java.lang.System during openjdk integration
+ sun.misc.SharedSecrets.setJavaLangAccess(new sun.misc.JavaLangAccess(){
+ public sun.reflect.ConstantPool getConstantPool(Class klass) {
+ //return klass.getConstantPool();
+ throw new UnsupportedOperationException();
+ }
+ public void setAnnotationType(Class klass, AnnotationType type) {
+ //klass.setAnnotationType(type);
+ throw new UnsupportedOperationException();
+ }
+ public AnnotationType getAnnotationType(Class klass) {
+ //return klass.getAnnotationType();
+ throw new UnsupportedOperationException();
+ }
+ public <E extends Enum<E>>
+ E[] getEnumConstantsShared(Class<E> klass) {
+ //return klass.getEnumConstantsShared();
+ return klass.getEnumConstants();
+ }
+ public void blockedOn(Thread t, Interruptible b) {
+ //t.blockedOn(b);
+ throw new UnsupportedOperationException();
+ }
+ });
+ }
+
final static boolean isInitialized() {
return inited;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|