org.codehaus.janino

Class IClassLoader

public abstract class IClassLoader extends Object

Loads an IClass by type name.
Field Summary
IClassBOOLEAN
IClassBYTE
IClassCHARACTER
IClassCLASS
IClassCLONEABLE
IClassDOUBLE
IClassERROR
IClassFLOAT
IClassINTEGER
IClassLONG
IClassOBJECT
IClassRUNTIME_EXCEPTION
IClassSERIALIZABLE
IClassSHORT
IClassSTRING
IClassTHROWABLE
Constructor Summary
IClassLoader(IClassLoader optionalParentIClassLoader)
Method Summary
protected voiddefineIClass(IClass iClass)
Define an IClass in the context of this IClassLoader.
protected abstract IClassfindIClass(String descriptor)
Find a new IClass by descriptor; return null if a class for that descriptor could not be found.
IClassloadIClass(String fieldDescriptor)
Get an IClass by field descriptor.
protected voidpostConstruct()
This method must be called by the constructor of the directly derived class.

Field Detail

BOOLEAN

public IClass BOOLEAN

BYTE

public IClass BYTE

CHARACTER

public IClass CHARACTER

CLASS

public IClass CLASS

CLONEABLE

public IClass CLONEABLE

DOUBLE

public IClass DOUBLE

ERROR

public IClass ERROR

FLOAT

public IClass FLOAT

INTEGER

public IClass INTEGER

LONG

public IClass LONG

OBJECT

public IClass OBJECT

RUNTIME_EXCEPTION

public IClass RUNTIME_EXCEPTION

SERIALIZABLE

public IClass SERIALIZABLE

SHORT

public IClass SHORT

STRING

public IClass STRING

THROWABLE

public IClass THROWABLE

Constructor Detail

IClassLoader

public IClassLoader(IClassLoader optionalParentIClassLoader)

Method Detail

defineIClass

protected final void defineIClass(IClass iClass)
Define an 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.

Throws: RuntimeException A different IClass object is already defined for this type

findIClass

protected abstract IClass findIClass(String descriptor)
Find a new IClass by descriptor; return null if a class for that descriptor could not be found.

Similar java.lang.ClassLoader#findClass(java.lang.String), this method must

The format of a descriptor is defined in JVMS 4.3.2. Typical descriptors are:

Notice that this method is never called for array types.

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.

Returns: null if a class with that descriptor could not be found

Throws: ClassNotFoundException if an exception was raised while loading the class

loadIClass

public final IClass loadIClass(String fieldDescriptor)
Get an IClass by field descriptor.

Returns: null if an IClass could not be loaded

UNKNOWN: ClassNotFoundException if an exception was raised while loading the IClass

postConstruct

protected final void postConstruct()
This method must be called by the constructor of the directly derived class. (The reason being is that this method invokes abstract loadIClass which will not work until the implementing class is constructed.)