public final class BootstrapClassLoader extends ClassLoader
Modifier and Type | Class and Description |
---|---|
private static interface |
BootstrapClassLoader.Handler<T> |
Modifier and Type | Field and Description |
---|---|
private static BootstrapClassLoader |
bootstrapClassLoader |
private static String |
bootstrapClasspath
Places whence we load bootstrap .class files.
|
private ImmutableEntryHashMapRVM<String,RVMType> |
loaded |
static String |
myName
Keep this a static field, since it's looked at in
MemberReference.parse(java.util.StringTokenizer) . |
private static HashMap<String,ZipFile> |
zipFileCache |
Modifier | Constructor and Description |
---|---|
private |
BootstrapClassLoader()
Prevent other classes from constructing one.
|
Modifier and Type | Method and Description |
---|---|
static void |
boot(String bootstrapClasspath)
Initialize for execution.
|
Class<?> |
findClass(String className)
Search the bootstrap class loader's classpath for given class.
|
URL |
findResource(String name) |
Enumeration<URL> |
findResources(String name) |
static BootstrapClassLoader |
getBootstrapClassLoader() |
static String |
getBootstrapRepositories() |
InputStream |
getResourceAsStream(String name) |
private <T> T |
getResourceInternal(String name,
BootstrapClassLoader.Handler<T> h,
boolean multiple) |
Class<?> |
loadClass(String className,
boolean resolveClass) |
(package private) RVMType |
loadVMClass(String className)
Backdoor for use by TypeReference.resolve when !
|
static void |
setBootstrapRepositories(String bootstrapClasspath)
Set list of places to be searched for VM classes and resources.
|
String |
toString() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
private final ImmutableEntryHashMapRVM<String,RVMType> loaded
private static String bootstrapClasspath
private static final BootstrapClassLoader bootstrapClassLoader
public static final String myName
MemberReference.parse(java.util.StringTokenizer)
.private static HashMap<String,ZipFile> zipFileCache
private BootstrapClassLoader()
public static void setBootstrapRepositories(String bootstrapClasspath)
bootstrapClasspath
- path specification in standard "classpath"
formatpublic static String getBootstrapRepositories()
public static void boot(String bootstrapClasspath)
bootstrapClasspath
- names of directories containing the bootstrap
.class files, and the names of any .zip/.jar files.
These are the ones that implement the VM and its
standard runtime libraries. This may contain several names separated
with colons (':'), just
as a classpath may. (null
==> use the values specified by
setBootstrapRepositories(java.lang.String)
when the boot image was created. This
feature is not actually used, but may be helpful in avoiding trouble.)public static BootstrapClassLoader getBootstrapClassLoader()
RVMType loadVMClass(String className) throws NoClassDefFoundError
className
- name of the class to be loadedNoClassDefFoundError
- when no definition of the class was foundpublic Class<?> loadClass(String className, boolean resolveClass) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public Class<?> findClass(String className) throws ClassNotFoundException
findClass
in class ClassLoader
className
- the name of the class to loadClassNotFoundException
- if the class was not found, or was invalidpublic InputStream getResourceAsStream(String name)
getResourceAsStream
in class ClassLoader
public URL findResource(String name)
findResource
in class ClassLoader
public Enumeration<URL> findResources(String name)
findResources
in class ClassLoader
private <T> T getResourceInternal(String name, BootstrapClassLoader.Handler<T> h, boolean multiple)