Package org.ow2.asm

Examples of org.ow2.asm.FieldVisitor.visitAttribute()


                name,
                desc,
                signature,
                exceptions);
        if (mv != null) {
            mv.visitAttribute(new CommentAttribute("this is a method comment"));
        }
        return mv;
    }
}
View Full Code Here


        fv = cw.visitField(ACC_PUBLIC, "f", "I", null, null);
        fv.visitAttribute(new Comment());
        fv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitAttribute(new Comment());
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");

        /*
 
View Full Code Here

        mv.visitJumpInsn(GOTO, l0);
        mv.visitLabel(l0);

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitAttribute(new CodeComment());
        mv.visitEnd();

        cw.visitEnd();
        return cw.toByteArray();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.