Methods Summary |
---|
static native java.lang.Class | defineClass(java.lang.ClassLoader cl, java.lang.String name, byte[] data, int offset, int len, java.security.ProtectionDomain pd)
|
static native java.lang.Class | defineClass(java.lang.ClassLoader cl, byte[] data, int offset, int len, java.security.ProtectionDomain pd)
|
static native java.lang.Class | findLoadedClass(java.lang.ClassLoader cl, java.lang.String name)
|
private static native java.lang.String | getBootClassPathResource(java.lang.String name, int index)
|
private static native int | getBootClassPathSize()Boot class path manipulation, for getResources().
|
static native java.lang.Class | getPrimitiveClass(char type)
|
static java.net.URL | getResource(java.lang.String name)Get a resource from a file in the bootstrap class path.
It would be simpler to just walk through the class path elements
ourselves, but that would require reopening Jar files.
We assume that the bootclasspath can't change once the VM has
started. This assumption seems to be supported by the spec.
int numEntries = getBootClassPathSize();
int i;
for (i = 0; i < numEntries; i++) {
String urlStr = getBootClassPathResource(name, i);
if (urlStr != null) {
try {
return new URL(urlStr);
}
catch (MalformedURLException mue) {
mue.printStackTrace();
// unexpected; keep going
}
}
}
return null;
|
static java.util.Enumeration | getResources(java.lang.String name)
ArrayList<URL> list = null;
int numEntries = getBootClassPathSize();
int i;
for (i = 0; i < numEntries; i++) {
String urlStr = getBootClassPathResource(name, i);
if (urlStr != null) {
if (list == null)
list = new ArrayList<URL>();
try {
list.add(new URL(urlStr));
}
catch (MalformedURLException mue) {
mue.printStackTrace();
// unexpected; keep going
}
}
}
if (list == null)
return null;
else
return new EnumerateListArray<URL>(list);
|
static native java.lang.Class | loadClass(java.lang.String name, boolean resolve)Load class with bootstrap class loader.
|