move proxy and annotation code from C++ to Java

This allows code shrinkers to remove it if it's not used by the application.
This commit is contained in:
Joel Dice
2009-09-19 16:21:15 -06:00
parent 1a2eb3836c
commit 953cb69e5e
15 changed files with 1056 additions and 783 deletions

View File

@ -33,9 +33,6 @@ public abstract class ClassLoader {
return ClassLoader.class.getClassLoader();
}
private static native Class defineClass
(ClassLoader loader, byte[] b, int offset, int length);
protected Class defineClass(String name, byte[] b, int offset, int length) {
if (b == null) {
throw new NullPointerException();
@ -45,7 +42,7 @@ public abstract class ClassLoader {
throw new IndexOutOfBoundsException();
}
return defineClass(this, b, offset, length);
return avian.SystemClassLoader.defineClass(this, b, offset, length);
}
protected Class findClass(String name) throws ClassNotFoundException {
@ -84,7 +81,7 @@ public abstract class ClassLoader {
}
protected void resolveClass(Class c) {
c.link(this);
avian.SystemClassLoader.link(c, this);
}
private ClassLoader getParent() {