All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.core.FlowClassLoader
java.lang.Object
   |
   +----java.lang.ClassLoader
           |
           +----edu.utah.janos.core.FlowClassLoader

  Summary

final class  FlowClassLoader
     extends java.lang.ClassLoader
{
          // Fields 1
     private Hashtable bytecodeTable;

          // Constructors 1
     FlowClassLoader(ClassSpec[]);

          // Methods 2
     void addClass(String, byte[]);
     public synchronized Class loadClass(String, boolean) throws ClassNotFoundException;
}

Loads class files for a Flow. There are two kinds of classes for a FlowClassLoader: system classes and Flow classes. The Flow classes are specified when the FlowClassLoader is created by the array of ClassSpecs. Each ClassSpec specifies a name and an array of bytes. System classes are those loaded by the parent ClassLoader.

A FlowClassLoader tries to find all loaded classes from the already-loaded classes, then asks if its a system class, and finally, checks the Flow-specific classes.




  Fields

· bytecodeTable

Summary  |  Top

   private Hashtable bytecodeTable


  Constructors

· FlowClassLoader

Summary  |  Top

   FlowClassLoader(ClassSpec[] classSpecs) 

Make a deep copy of the ClassSpec and push into the table of name to bytecode mappings.

FlowClassLoaders are only created when a new Flow() is created. The ClassSpec elements have to be duplicated because the parameter is from the parent process's memory.

Parameter Description
classSpecs array of name and bytecode pairs.



  Methods

· addClass

Summary  |  Top
   void addClass(String name, 
                 byte[] bytecode) 

Add a new class to an existing flow. This should be called from inside the flow that the class is being added to. Neither argument may be null.



· loadClass

Summary  |  Top
   public synchronized Class loadClass(String name, 
                                       boolean resolve)  throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7