01: package build;
02:
03: public abstract class Loadlet {
04: protected Loadlet parent;
05:
06: public Loadlet getParent() {
07: return this .parent;
08: }
09:
10: Loadlet(Loadlet parent) {
11: this .parent = parent;
12: }
13:
14: public byte[] findClass(String name) {
15: Loadlet ls = this ;
16: while (ls != null) {
17: byte[] bs = ls.loadClassData(name);
18: if (bs != null)
19: return bs;
20: ls = ls.getParent();
21: }
22: return null;
23: }
24:
25: public abstract byte[] loadClassData(String name);
26: }
|