45 |
import java.util.Map; |
import java.util.Map; |
46 |
import java.util.HashMap; |
import java.util.HashMap; |
47 |
|
|
48 |
|
import gnu.java.util.EmptyEnumeration; |
49 |
|
|
50 |
/** |
/** |
51 |
* java.lang.VMClassLoader is a package-private helper for VMs to implement |
* java.lang.VMClassLoader is a package-private helper for VMs to implement |
52 |
* on behalf of java.lang.ClassLoader. |
* on behalf of java.lang.ClassLoader. |
111 |
/** |
/** |
112 |
* Helper to load a class from the bootstrap class loader. |
* Helper to load a class from the bootstrap class loader. |
113 |
* |
* |
114 |
* XXX - Not implemented yet; this requires native help. |
* XXX - Not implemented; this requires native help. |
115 |
* |
* |
116 |
* @param name the class name to load |
* @param name the class name to load |
117 |
* @param resolve whether to resolve it |
* @param resolve whether to resolve it |
120 |
static final Class loadClass(String name, boolean resolve) |
static final Class loadClass(String name, boolean resolve) |
121 |
throws ClassNotFoundException |
throws ClassNotFoundException |
122 |
{ |
{ |
123 |
return Class.forName(name, resolve, ClassLoader.getSystemClassLoader()); |
throw new ClassNotFoundException(name); |
124 |
} |
} |
125 |
|
|
126 |
/** |
/** |
127 |
* Helper to load a resource from the bootstrap class loader. |
* Helper to load a resource from the bootstrap class loader. |
128 |
* |
* |
129 |
* XXX - Not implemented yet; this requires native help. |
* XXX - Not implemented; this requires native help. |
130 |
* |
* |
131 |
* @param name the resource to find |
* @param name the resource to find |
132 |
* @return the URL to the resource |
* @return the URL to the resource |
133 |
*/ |
*/ |
134 |
static URL getResource(String name) |
static URL getResource(String name) |
135 |
{ |
{ |
136 |
return ClassLoader.getSystemResource(name); |
return null; |
137 |
} |
} |
138 |
|
|
139 |
/** |
/** |
140 |
* Helper to get a list of resources from the bootstrap class loader. |
* Helper to get a list of resources from the bootstrap class loader. |
141 |
* |
* |
142 |
* XXX - Not implemented yet; this requires native help. |
* XXX - Not implemented; this requires native help. |
143 |
* |
* |
144 |
* @param name the resource to find |
* @param name the resource to find |
145 |
* @return an enumeration of resources |
* @return an enumeration of resources |
147 |
*/ |
*/ |
148 |
static Enumeration getResources(String name) throws IOException |
static Enumeration getResources(String name) throws IOException |
149 |
{ |
{ |
150 |
return ClassLoader.getSystemResources(name); |
return EmptyEnumeration.getInstance(); |
151 |
} |
} |
152 |
|
|
153 |
/** |
/** |