public abstract class IClassLoader extends Object
IClass by type name.| Constructor and Description |
|---|
IClassLoader(IClassLoader optionalParentIClassLoader) |
| Modifier and Type | Method and Description |
|---|---|
static IClassLoader |
createJavacLikePathIClassLoader(File[] optionalBootClassPath,
File[] optionalExtDirs,
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(String descriptor)
|
IClass |
loadIClass(String fieldDescriptor)
Get an
IClass by field descriptor. |
protected void |
postConstruct()
This method must be called by the constructor of the derived class.
|
public IClass TYPE_java_lang_annotation_Retention
public IClass TYPE_java_lang_AssertionError
public IClass TYPE_java_lang_Boolean
public IClass TYPE_java_lang_Byte
public IClass TYPE_java_lang_Character
public IClass TYPE_java_lang_Class
public IClass TYPE_java_lang_Cloneable
public IClass TYPE_java_lang_Double
public IClass TYPE_java_lang_Enum
public IClass TYPE_java_lang_Error
public IClass TYPE_java_lang_Exception
public IClass TYPE_java_lang_Float
public IClass TYPE_java_lang_Integer
public IClass TYPE_java_lang_Iterable
public IClass TYPE_java_lang_Long
public IClass TYPE_java_lang_Object
public IClass TYPE_java_lang_Override
public IClass TYPE_java_lang_RuntimeException
public IClass TYPE_java_lang_Short
public IClass TYPE_java_lang_String
public IClass TYPE_java_lang_StringBuilder
public IClass TYPE_java_lang_Throwable
public IClass TYPE_java_io_Serializable
public IClass TYPE_java_util_Iterator
public IClass.IMethod METH_java_lang_Iterable__iterator
public IClass.IMethod METH_java_lang_String__concat__java_lang_String
public IClass.IMethod METH_java_lang_String__valueOf__int
public IClass.IMethod METH_java_lang_String__valueOf__long
public IClass.IMethod METH_java_lang_String__valueOf__float
public IClass.IMethod METH_java_lang_String__valueOf__double
public IClass.IMethod METH_java_lang_String__valueOf__char
public IClass.IMethod METH_java_lang_String__valueOf__boolean
public IClass.IMethod METH_java_lang_String__valueOf__java_lang_Object
public IClass.IMethod METH_java_lang_StringBuilder__append__int
public IClass.IMethod METH_java_lang_StringBuilder__append__long
public IClass.IMethod METH_java_lang_StringBuilder__append__float
public IClass.IMethod METH_java_lang_StringBuilder__append__double
public IClass.IMethod METH_java_lang_StringBuilder__append__char
public IClass.IMethod METH_java_lang_StringBuilder__append__boolean
public IClass.IMethod METH_java_lang_StringBuilder__append__java_lang_Object
public IClass.IMethod METH_java_lang_StringBuilder__append__java_lang_String
public IClass.IMethod METH_java_lang_StringBuilder__toString
public IClass.IMethod METH_java_util_Iterator__hasNext
public IClass.IMethod METH_java_util_Iterator__next
@Nullable public IClass.IConstructor CTOR_java_lang_StringBuilder__java_lang_String
public IClassLoader(@Nullable
IClassLoader optionalParentIClassLoader)
protected final void postConstruct()
loadIClass(String) which will not work until the derived class is constructed.)@Nullable public final IClass loadIClass(String fieldDescriptor) throws ClassNotFoundException
IClass by field descriptor.fieldDescriptor - E.g. 'Lpkg1/pkg2/Outer$Inner;'null if an IClass could not be loadedClassNotFoundException - An exception was raised while loading the IClass@Nullable protected abstract IClass findIClass(String descriptor) throws 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 foundClassNotFoundException - 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).
RuntimeException - A different IClass object is already defined for this typepublic static IClassLoader createJavacLikePathIClassLoader(@Nullable File[] optionalBootClassPath, @Nullable File[] optionalExtDirs, 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.