Example usage for org.objectweb.asm.commons AdviceAdapter visitCode

List of usage examples for org.objectweb.asm.commons AdviceAdapter visitCode

Introduction

In this page you can find the example usage for org.objectweb.asm.commons AdviceAdapter visitCode.

Prototype

@Override
    public void visitCode() 

Source Link

Usage

From source file:com.axway.jmb.builders.Constructors.java

License:Open Source License

public static void buildDefault(ClassVisitor clazz, String superClassInternalFQName) {
    MethodVisitor mv = clazz.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
    AdviceAdapter constructor = new AdviceAdapter(ASM5, mv, ACC_PUBLIC, "<init>", "()V") {
    };//from ww  w .  ja  v  a2  s .  c  om
    constructor.visitCode();
    constructor.visitMaxs(4, 1);

    callSuperConstructor(constructor, superClassInternalFQName);

    constructor.visitInsn(RETURN);
    constructor.visitEnd();
}