* @param cw the class writer
* @param className the generated class name.
*/
private static void generateConstructor(ClassWriter cw, String className, String parent) {
MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", '(' + DEPENDENCY_DESC + ")V", null, null);
mv.visitCode();
mv.visitVarInsn(ALOAD, 0); // Load this
mv.visitInsn(DUP); // Dup
mv.visitMethodInsn(INVOKESPECIAL, parent, "<init>", "()V"); // Call super
mv.visitVarInsn(ALOAD, 1); // Load the argument