VMClassLoader.java (getVMClassLoader): New method.
* gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): New method. (redirect): New static field. * java/lang/ClassLoader.java (getSystemClassLoader): Now native (getVMClassLoader0): Removed. * java/lang/natClassLoader.cc (getVMClassLoader0): Removed. (redirect): Removed. (getSystemClassLoader): Implemented. From-SVN: r30075
This commit is contained in:
parent
35c95c5a65
commit
4b84737d47
@ -1,3 +1,15 @@
|
||||
1999-10-18 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* gnu/gcj/runtime/VMClassLoader.java (getVMClassLoader): New
|
||||
method.
|
||||
(redirect): New static field.
|
||||
* java/lang/ClassLoader.java (getSystemClassLoader): Now
|
||||
native
|
||||
(getVMClassLoader0): Removed.
|
||||
* java/lang/natClassLoader.cc (getVMClassLoader0): Removed.
|
||||
(redirect): Removed.
|
||||
(getSystemClassLoader): Implemented.
|
||||
|
||||
1999-10-16 Anthony Green <green@cygnus.com>
|
||||
|
||||
* java/lang/ClassLoader.java (getSystemResource): Use
|
||||
|
@ -59,4 +59,15 @@ final class VMClassLoader extends java.net.URLClassLoader
|
||||
*/
|
||||
protected final native Class findSystemClass(String name)
|
||||
throws java.lang.ClassNotFoundException, java.lang.LinkageError;
|
||||
|
||||
// Return the sole VMClassLoader.
|
||||
private static synchronized VMClassLoader getVMClassLoader ()
|
||||
{
|
||||
if (redirect == null)
|
||||
redirect = new VMClassLoader ();
|
||||
return redirect;
|
||||
}
|
||||
|
||||
// The only VMClassLoader that can exist.
|
||||
private static VMClassLoader redirect;
|
||||
}
|
||||
|
@ -34,13 +34,7 @@ public abstract class ClassLoader {
|
||||
return parent;
|
||||
}
|
||||
|
||||
private static native ClassLoader getVMClassLoader0 ();
|
||||
|
||||
static public ClassLoader getSystemClassLoader () {
|
||||
if (system == null)
|
||||
system = getVMClassLoader0 ();
|
||||
return system;
|
||||
}
|
||||
public static native ClassLoader getSystemClassLoader ();
|
||||
|
||||
/**
|
||||
* Creates a <code>ClassLoader</code> with no parent.
|
||||
|
@ -48,14 +48,13 @@ extern java::lang::Class ClassLoaderClass;
|
||||
|
||||
/////////// java.lang.ClassLoader native methods ////////////
|
||||
|
||||
static gnu::gcj::runtime::VMClassLoader *redirect = 0;
|
||||
|
||||
java::lang::ClassLoader*
|
||||
java::lang::ClassLoader::getVMClassLoader0 ()
|
||||
java::lang::ClassLoader *
|
||||
java::lang::ClassLoader::getSystemClassLoader (void)
|
||||
{
|
||||
if (redirect == 0)
|
||||
redirect = new gnu::gcj::runtime::VMClassLoader;
|
||||
return redirect;
|
||||
JvSynchronize sync (&ClassLoaderClass);
|
||||
if (! system)
|
||||
system = gnu::gcj::runtime::VMClassLoader::getVMClassLoader ();
|
||||
return system;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user