124 |
public abstract class ClassLoader |
public abstract class ClassLoader |
125 |
{ |
{ |
126 |
/** |
/** |
|
* All classes loaded by this classloader. If the VM's chooses to implement |
|
|
* this cache natively this field will be null. |
|
|
* It is not private in order to allow VMClassLoader access to this field. |
|
|
*/ |
|
|
final HashMap loadedClasses = |
|
|
VMClassLoader.USE_VM_CACHE ? null : new HashMap(); |
|
|
|
|
|
/** |
|
127 |
* All packages defined by this classloader. It is not private in order to |
* All packages defined by this classloader. It is not private in order to |
128 |
* allow native code (and trusted subclasses) access to this field. |
* allow native code (and trusted subclasses) access to this field. |
129 |
*/ |
*/ |
469 |
if (! initialized) |
if (! initialized) |
470 |
throw new SecurityException("attempt to define class from uninitialized class loader"); |
throw new SecurityException("attempt to define class from uninitialized class loader"); |
471 |
|
|
472 |
Class retval = VMClassLoader.defineClass(this, name, data, |
return VMClassLoader.defineClass(this, name, data, offset, len, domain); |
|
offset, len, domain); |
|
|
if (! VMClassLoader.USE_VM_CACHE) |
|
|
loadedClasses.put(retval.getName(), retval); |
|
|
return retval; |
|
473 |
} |
} |
474 |
|
|
475 |
/** |
/** |