public abstract class IClassLoader
extends java.lang.Object
IClass by type name.| Constructor and Description |
|---|
IClassLoader(IClassLoader optionalParentIClassLoader) |
| Modifier and Type | Method and Description |
|---|---|
static IClassLoader |
createJavacLikePathIClassLoader(java.io.File[] optionalBootClassPath,
java.io.File[] optionalExtDirs,
java.io.File[] classPath)
Create an
IClassLoader that looks for classes in the given "boot class
path", then in the given "extension directories", and then in the given
"class path". |
protected void |
defineIClass(IClass iClass)
Define an
IClass in the context of this IClassLoader. |
protected abstract IClass |
findIClass(java.lang.String descriptor)
|
IClass |
loadIClass(java.lang.String fieldDescriptor)
Get an
IClass by field descriptor. |
protected void |
postConstruct()
This method must be called by the constructor of the directly derived
class.
|
public IClass JAVA_LANG_OBJECT
public IClass JAVA_LANG_STRING
public IClass JAVA_LANG_CLASS
public IClass JAVA_LANG_THROWABLE
public IClass JAVA_LANG_RUNTIMEEXCEPTION
public IClass JAVA_LANG_ERROR
public IClass JAVA_LANG_CLONEABLE
public IClass JAVA_LANG_ASSERTIONERROR
public IClass JAVA_LANG_OVERRIDE
public IClass JAVA_IO_SERIALIZABLE
public IClass JAVA_LANG_BOOLEAN
public IClass JAVA_LANG_BYTE
public IClass JAVA_LANG_CHARACTER
public IClass JAVA_LANG_SHORT
public IClass JAVA_LANG_INTEGER
public IClass JAVA_LANG_LONG
public IClass JAVA_LANG_FLOAT
public IClass JAVA_LANG_DOUBLE
public IClassLoader(IClassLoader optionalParentIClassLoader)
protected final void postConstruct()
loadIClass(String) which will not work until the implementing
class is constructed.)public final IClass loadIClass(java.lang.String fieldDescriptor) throws java.lang.ClassNotFoundException
IClass by field descriptor.protected abstract IClass findIClass(java.lang.String descriptor) throws java.lang.ClassNotFoundException
IClass by descriptor; return null if a class
for that descriptor could not be found.
Similar ClassLoader.findClass(java.lang.String), this method
must
IClass object from somewhere for the given type
defineIClass(IClass) with that IClass object as
the argument
IClass object
The format of a descriptor is defined in JVMS 4.3.2. Typical
descriptors are:
I (Integer)
Lpkg1/pkg2/Cls; (Class declared in package)
Lpkg1/pkg2/Outer$Inner; Member class
Notice that this method is never called from more than one thread at a time. In other words, implementations of this method need not be synchronized.
null if a class with that descriptor could not be foundjava.lang.ClassNotFoundException - if an exception was raised while loading the classprotected final void defineIClass(IClass iClass)
IClass in the context of this IClassLoader.
If an IClass with that descriptor already exists, a
RuntimeException is thrown.
This method should only be called from an implementation of
findIClass(String).
java.lang.RuntimeException - A different IClass object is already defined for this typepublic static IClassLoader createJavacLikePathIClassLoader(java.io.File[] optionalBootClassPath, java.io.File[] optionalExtDirs, java.io.File[] classPath)
IClassLoader that looks for classes in the given "boot class
path", then in the given "extension directories", and then in the given
"class path".
The default for the optionalBootClassPath is the path defined in
the system property "sun.boot.class.path", and the default for the
optionalExtensionDirs is the path defined in the "java.ext.dirs"
system property.