mirror of
https://github.com/corda/corda.git
synced 2025-06-14 13:18:18 +00:00
update to more recent version of Android class library
Lots has changed since we forked Android's libcore, so merging the latest upstream code has required extensive changes to the Avian/Android port. One big change is that we now use Avian's versions of java.lang.Object, java.lang.Class, java.lang.ClassLoader, some java.lang.reflect.* classes, etc. instead of the Android versions. The main reason is that the Android versions have become very Dex/Dalvik-specific, and since Avian is based on Java class files, not dex archives, that code doesn't make sense here. This has the side benefit that we can share more native code with classpath-avian.cpp and reduce the amount of Java/C++ code duplication.
This commit is contained in:
@ -19,6 +19,7 @@ import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.security.ProtectionDomain;
|
||||
|
||||
public abstract class ClassLoader {
|
||||
private final ClassLoader parent;
|
||||
@ -92,6 +93,12 @@ public abstract class ClassLoader {
|
||||
(avian.Classes.defineVMClass(this, b, offset, length));
|
||||
}
|
||||
|
||||
protected Class defineClass(String name, byte[] b, int offset, int length,
|
||||
ProtectionDomain domain)
|
||||
{
|
||||
return defineClass(name, b, offset, length);
|
||||
}
|
||||
|
||||
protected Class findClass(String name) throws ClassNotFoundException {
|
||||
throw new ClassNotFoundException();
|
||||
}
|
||||
@ -196,6 +203,10 @@ public abstract class ClassLoader {
|
||||
return urls;
|
||||
}
|
||||
|
||||
protected String findLibrary(String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
static native Class getCaller();
|
||||
|
||||
static native void load(String name, Class caller, boolean mapName);
|
||||
|
Reference in New Issue
Block a user