01: package build;
02:
03: public abstract class LoadletClassLoader extends ClassLoader {
04:
05: protected Loadlet loadlet;
06:
07: protected Loadlet getLoadlet() {
08: return this .loadlet;
09: }
10:
11: public LoadletClassLoader(ClassLoader parent, Loadlet loadlet) {
12: super (parent);
13: this .loadlet = loadlet;
14: }
15:
16: protected Class findClass(String name)
17: throws ClassNotFoundException {
18: byte[] b = loadlet.findClass(name);
19: if (b == null)
20: throw new ClassNotFoundException(name);
21: return defineClass(name, b, 0, b.length);
22: }
23: }
|