panda.aop.asm.ChangeToChildConstructorMethodAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-glue Show documentation
Show all versions of panda-glue Show documentation
Panda Glue is a ASM/AOP module of the Panda Framework.
The newest version!
package panda.aop.asm;
import static panda.asm.Opcodes.ALOAD;
import static panda.asm.Opcodes.INVOKESPECIAL;
import static panda.asm.Opcodes.RETURN;
import panda.asm.MethodVisitor;
/**
* @author wendal([email protected])
*/
class ChangeToChildConstructorMethodAdapter extends NormalMethodAdapter {
private String superClassName;
ChangeToChildConstructorMethodAdapter(MethodVisitor mv, String desc, int access, String superClassName) {
super(mv, desc, access);
this.superClassName = superClassName;
}
void visitCode() {
mv.visitCode();
mv.visitVarInsn(ALOAD, 0);
loadArgs();
mv.visitMethodInsn(INVOKESPECIAL, superClassName, "", desc);
mv.visitInsn(RETURN);
mv.visitMaxs(2, 2);
mv.visitEnd();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy