All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.aop.asm.ChangeToChildConstructorMethodAdapter Maven / Gradle / Ivy

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