JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.core.dist
Class DistdClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--org.objectweb.jac.core.dist.DistdClassLoader

public class DistdClassLoader
extends ClassLoader

DistdClassLoader is a class loader that load classes from a remote JAC container (the class repository site).

Author:
Renaud Pawlak
See Also:
RemoteContainer.getByteCodeFor(String)

Field Summary
 boolean bootstrapping
          Bootstrapping flag (do not load classes while true).
static String classRepositoryName
          The class repository site.
protected  Hashtable loadedByteCodes
          loadedByteCodes is a hashtable of byte codes that have been remotely load (so that this site may be used as an intermediate class repository.
protected  Hashtable loadedClasses
          loadedClasses is a hashtable of classes that have been loaded.
 
Constructor Summary
DistdClassLoader()
           
 
Method Summary
 byte[] getByteCode(String className)
          Gets the bytecode for a given remotely loaded class name.
 Class loadClass(String name)
          Overrides the default mechanism to load classes (only for non-java classes).
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loadedClasses

protected transient Hashtable loadedClasses
loadedClasses is a hashtable of classes that have been loaded.


loadedByteCodes

protected Hashtable loadedByteCodes
loadedByteCodes is a hashtable of byte codes that have been remotely load (so that this site may be used as an intermediate class repository.


bootstrapping

public boolean bootstrapping
Bootstrapping flag (do not load classes while true).


classRepositoryName

public static String classRepositoryName
The class repository site.

Constructor Detail

DistdClassLoader

public DistdClassLoader()
Method Detail

loadClass

public Class loadClass(String name)
                throws ClassNotFoundException
Overrides the default mechanism to load classes (only for non-java classes). The behavior is the following :

Overrides:
loadClass in class ClassLoader
Parameters:
name - the name for the class to load
Returns:
the loaded class
ClassNotFoundException

getByteCode

public byte[] getByteCode(String className)
Gets the bytecode for a given remotely loaded class name.

Parameters:
className - the name of the class
Returns:
the corresponding bytecode

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli