Package org.ow2.asm

Examples of org.ow2.asm.MethodVisitor.visitMethodInsn()


                }

                @Override
                protected void onMethodExit(final int opcode) {
                    mv.visitLdcInsn(cname + "." + name + desc);
                    mv.visitMethodInsn(INVOKESTATIC,
                            "org/ow2/asm/commons/AdviceAdapterUnitTest",
                            "exit",
                            "(Ljava/lang/String;)V");
                }
View Full Code Here


        fv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL,
                "java/util/ArrayList",
                "<init>",
                "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

                "<init>",
                "()V",
                null,
                null);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(1, 1);
        mv.visitEnd();

        // eval method
View Full Code Here

            gv.visitFieldInsn(GETSTATIC,
                    "java/lang/System",
                    "err",
                    "Ljava/io/PrintStream;");
            gv.visitLdcInsn("_get" + name + " called");
            gv.visitMethodInsn(INVOKEVIRTUAL,
                    "java/io/PrintStream",
                    "println",
                    "(Ljava/lang/String;)V");
            gv.visitVarInsn(ALOAD, 0);
            gv.visitFieldInsn(GETFIELD, owner, name, desc);
View Full Code Here

            sv.visitFieldInsn(GETSTATIC,
                    "java/lang/System",
                    "err",
                    "Ljava/io/PrintStream;");
            sv.visitLdcInsn("_set" + name + " called");
            sv.visitMethodInsn(INVOKEVIRTUAL,
                    "java/io/PrintStream",
                    "println",
                    "(Ljava/lang/String;)V");
            sv.visitVarInsn(ALOAD, 0);
            sv.visitVarInsn(t.getOpcode(ILOAD), 1);
View Full Code Here

                null,
                null);
        // pushes the 'this' variable
        mw.visitVarInsn(ALOAD, 0);
        // invokes the super class constructor
        mw.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mw.visitInsn(RETURN);
        // this code uses a maximum of one stack element and one local variable
        mw.visitMaxs(1, 1);
        mw.visitEnd();
View Full Code Here

                "out",
                "Ljava/io/PrintStream;");
        // pushes the "Hello World!" String constant
        mw.visitLdcInsn("Hello world!");
        // invokes the 'println' method (defined in the PrintStream class)
        mw.visitMethodInsn(INVOKEVIRTUAL,
                "java/io/PrintStream",
                "println",
                "(Ljava/lang/String;)V");
        mw.visitInsn(RETURN);
        // this code uses a maximum of two stack elements and two local
View Full Code Here

        MethodVisitor mv;
        {
            mv = cv.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
            mv.visitCode();
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL,
                    "java/lang/Object",
                    "<init>",
                    "()V");
            mv.visitInsn(RETURN);
            mv.visitMaxs(1, 1);
View Full Code Here

                        mv.visitVarInsn(ALOAD, V_OS);
                        mv.visitVarInsn(ALOAD, V_D);
                        mv.visitVarInsn(ILOAD, V_P);
                        mv.visitInsn(IALOAD);
                        mv.visitMethodInsn(INVOKEVIRTUAL,
                                "java/io/OutputStream",
                                "write",
                                "(I)V");
                        break;
View Full Code Here

                        d = storeD(mv, d);

                        mv.visitVarInsn(ALOAD, V_D);
                        mv.visitVarInsn(ILOAD, V_P);
                        mv.visitVarInsn(ALOAD, V_IS);
                        mv.visitMethodInsn(INVOKEVIRTUAL,
                                "java/io/InputStream",
                                "read",
                                "()I");
                        mv.visitInsn(IASTORE);
                        break;
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.