org.openware.jdf
Class JDFClassLoader

org.openware.jdf.JDFClassLoader

public class JDFClassLoader

Class loader for the client. This will create a stub class on the fly and return it. Mucho thanks to the guys who wrote JAS which made this cool feature possible.

Basically, we take the class specified and create a Proxy class by creating a new class that extends JDFObject and adds methods for each method in the original class.

Author:
Vincent Sheffer

Constructor Summary
JDFClassLoader(java.lang.ClassLoader parent)
           
 
Method Summary
 java.lang.Class findClass(java.lang.String remoteClassName)
          Create a class based on the type given in the argument to this method.
 void writeClass(java.lang.String rootdir, java.lang.String proxyClassName)
           
 

Constructor Detail

JDFClassLoader

public JDFClassLoader(java.lang.ClassLoader parent)
Method Detail

findClass

public java.lang.Class findClass(java.lang.String remoteClassName)
                          throws java.lang.ClassNotFoundException
Create a class based on the type given in the argument to this method. The new class subclasses JDFObject and implements an interface that has the name of the class given with an 'I' prepended. So, for instance, if the name of the class to this method is 'org.openware.Test' then the interface name should be 'org.openware.ITest'.
Throws:
java.lang.ClassNotFoundException - if the interface cannot be found.

writeClass

public void writeClass(java.lang.String rootdir,
                       java.lang.String proxyClassName)
                throws java.lang.ClassNotFoundException,
                       java.io.FileNotFoundException,
                       java.io.IOException


Copyright © 2000, 2001 Openware, Spin Software. All Rights Reserved.