jClass.addInterface(iface.getName().replace('.', '/'));
}
jClass.addInterface(ScopeProxy.class.getName().replace('.', '/'));
JavaField factoryField =
jClass.createField("_factory",
"Lcom/caucho/config/inject/InjectManager$ReferenceFactory;");
factoryField.setAccessFlags(Modifier.PRIVATE);
JavaMethod ctor =
jClass.createMethod("<init>",
"(Lcom/caucho/config/inject/InjectManager$ReferenceFactory;)V");
ctor.setAccessFlags(Modifier.PUBLIC);
CodeWriterAttribute code = ctor.createCodeWriter();
code.setMaxLocals(3);
code.setMaxStack(4);
code.pushObjectVar(0);
code.pushObjectVar(1);
code.putField(thisClassName, factoryField.getName(),
factoryField.getDescriptor());
code.pushObjectVar(0);
code.invokespecial(superClassName, "<init>", "()V", 1, 0);
code.addReturn();
code.close();