public abstract class IClassLoader
extends java.lang.Object
IClass by type name.| Modifier and Type | Field and Description |
|---|---|
IClass |
ANNO_java_lang_Override
Representation of the
Override annotation. |
IClass.IConstructor |
CTOR_java_lang_StringBuilder__java_lang_String
Representation of the
StringBuilder(String) constructor. |
private static boolean |
DEBUG |
private java.util.Map<java.lang.String,IClass> |
loadedIClasses |
IClass.IMethod |
METH_java_lang_Iterable__iterator
Representation of the
Iterable.iterator() method. |
IClass.IMethod |
METH_java_lang_String__concat__java_lang_String
Representation of the
String.concat(String) method. |
IClass.IMethod |
METH_java_lang_String__valueOf__boolean
Representation of the
String.valueOf(boolean) method. |
IClass.IMethod |
METH_java_lang_String__valueOf__char
Representation of the
String.valueOf(char) method. |
IClass.IMethod |
METH_java_lang_String__valueOf__double
Representation of the
String.valueOf(double) method. |
IClass.IMethod |
METH_java_lang_String__valueOf__float
Representation of the
String.valueOf(float) method. |
IClass.IMethod |
METH_java_lang_String__valueOf__int
Representation of the
String.valueOf(int) method. |
IClass.IMethod |
METH_java_lang_String__valueOf__java_lang_Object
Representation of the
String.valueOf(Object) method. |
IClass.IMethod |
METH_java_lang_String__valueOf__long
Representation of the
String.valueOf(long) method. |
IClass.IMethod |
METH_java_lang_StringBuilder__append__java_lang_String
Representation of the
StringBuilder.append(String) method. |
IClass.IMethod |
METH_java_lang_StringBuilder__toString
Representation of the
StringBuilder.toString() method. |
IClass.IMethod |
METH_java_util_Iterator__hasNext
Representation of the
Iterator.hasNext() method. |
IClass.IMethod |
METH_java_util_Iterator__next
Representation of the
Iterator.next() method. |
private IClassLoader |
optionalParentIClassLoader |
IClass |
TYPE_java_io_Serializable
Representation of the
Serializable type. |
IClass |
TYPE_java_lang_AssertionError
Representation of the
AssertionError type. |
IClass |
TYPE_java_lang_Boolean
Representation of the
Boolean type. |
IClass |
TYPE_java_lang_Byte
Representation of the
Byte type. |
IClass |
TYPE_java_lang_Character
Representation of the
Character type. |
IClass |
TYPE_java_lang_Class
Representation of the
Class type. |
IClass |
TYPE_java_lang_Cloneable
Representation of the
Cloneable type. |
IClass |
TYPE_java_lang_Double
Representation of the
Double type. |
IClass |
TYPE_java_lang_Error
Representation of the
Error type. |
IClass |
TYPE_java_lang_Exception
Representation of the
Exception type. |
IClass |
TYPE_java_lang_Float
Representation of the
Float type. |
IClass |
TYPE_java_lang_Integer
Representation of the
Integer type. |
IClass |
TYPE_java_lang_Iterable
Representation of the
Iterable type. |
IClass |
TYPE_java_lang_Long
Representation of the
Long type. |
IClass |
TYPE_java_lang_Object
Representation of the
Object type. |
IClass |
TYPE_java_lang_RuntimeException
Representation of the
RuntimeException type. |
IClass |
TYPE_java_lang_Short
Representation of the
Short type. |
IClass |
TYPE_java_lang_String
Representation of the
String type. |
IClass |
TYPE_java_lang_StringBuilder
Representation of the
StringBuilder type. |
IClass |
TYPE_java_lang_Throwable
Representation of the
Throwable type. |
IClass |
TYPE_java_util_Iterator
Representation of the
Iterator type. |
private java.util.Set<java.lang.String> |
unloadableIClasses |
| 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.
|
private static final boolean DEBUG
public IClass ANNO_java_lang_Override
Override annotation.public IClass TYPE_java_lang_AssertionError
AssertionError type.public IClass TYPE_java_lang_Boolean
Boolean type.public IClass TYPE_java_lang_Byte
Byte type.public IClass TYPE_java_lang_Character
Character type.public IClass TYPE_java_lang_Class
Class type.public IClass TYPE_java_lang_Cloneable
Cloneable type.public IClass TYPE_java_lang_Double
Double type.public IClass TYPE_java_lang_Exception
Exception type.public IClass TYPE_java_lang_Error
Error type.public IClass TYPE_java_lang_Float
Float type.public IClass TYPE_java_lang_Integer
Integer type.public IClass TYPE_java_lang_Iterable
Iterable type.public IClass TYPE_java_lang_Long
Long type.public IClass TYPE_java_lang_Object
Object type.public IClass TYPE_java_lang_RuntimeException
RuntimeException type.public IClass TYPE_java_lang_Short
Short type.public IClass TYPE_java_lang_String
String type.public IClass TYPE_java_lang_StringBuilder
StringBuilder type.public IClass TYPE_java_lang_Throwable
Throwable type.public IClass TYPE_java_io_Serializable
Serializable type.public IClass TYPE_java_util_Iterator
Iterator type.public IClass.IMethod METH_java_lang_Iterable__iterator
Iterable.iterator() method.public IClass.IMethod METH_java_lang_String__concat__java_lang_String
String.concat(String) method.public IClass.IMethod METH_java_lang_String__valueOf__int
String.valueOf(int) method.public IClass.IMethod METH_java_lang_String__valueOf__long
String.valueOf(long) method.public IClass.IMethod METH_java_lang_String__valueOf__float
String.valueOf(float) method.public IClass.IMethod METH_java_lang_String__valueOf__double
String.valueOf(double) method.public IClass.IMethod METH_java_lang_String__valueOf__char
String.valueOf(char) method.public IClass.IMethod METH_java_lang_String__valueOf__boolean
String.valueOf(boolean) method.public IClass.IMethod METH_java_lang_String__valueOf__java_lang_Object
String.valueOf(Object) method.public IClass.IMethod METH_java_lang_StringBuilder__append__java_lang_String
StringBuilder.append(String) method.public IClass.IMethod METH_java_lang_StringBuilder__toString
StringBuilder.toString() method.public IClass.IMethod METH_java_util_Iterator__hasNext
Iterator.hasNext() method.public IClass.IMethod METH_java_util_Iterator__next
Iterator.next() method.public IClass.IConstructor CTOR_java_lang_StringBuilder__java_lang_String
StringBuilder(String) constructor.private final IClassLoader optionalParentIClassLoader
private final java.util.Map<java.lang.String,IClass> loadedIClasses
private final java.util.Set<java.lang.String> unloadableIClasses
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.