Examples of visitInsn()


Examples of org.objectweb.asm.commons.GeneratorAdapter.visitInsn()

        ga.unbox(m.getReturnType());
        ga.returnValue();

        // this is a simple rethrow handler
        Label rethrow = ga.mark();
        ga.visitInsn(Opcodes.ATHROW);

        for (int i = 0; i < ex.length; i++) {
            ga.visitTryCatchBlock(before, after, rethrow, ex[i]
                    .getInternalName());
        }
View Full Code Here

Examples of org.objectweb.asm.tree.MethodNode.visitInsn()

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    mn.visitInsn(ICONST_0);
    mn.visitInsn(IADD);
    mn.visitInsn(IRETURN);
    mn.visitMaxs(0, 0);
    mn.visitEnd();
    new RemoveAddZeroTransformer(null).transform(mn);
View Full Code Here

Examples of org.objectweb.asm.util.TraceMethodVisitor.visitInsn()

  protected void checkMethod(TraceMethodVisitor tmv) {
    TraceMethodVisitor mv = new TraceMethodVisitor(null);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    assertEquals(mv, tmv);
  }
View Full Code Here

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

        mv = cw.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(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_DEPRECATED, "m", "()V", null, null);
        mv.visitCode();
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitInsn()

        }

        generateBodyInjectedMethod(mv);

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    /**
 
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitInsn()

        // Reset the context attribute and its getter/setter.
        CommonClassGenerator.nullifyField(mv, this.classAnnotationMetadata.getClassName(), "easyBeansContext",
                EZBEJBContext.class);

        // End of the method
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitInsn()

        // No timeout method, then needs to throw an exception
        // throw new EJBException("No timeout method has been defined on this bean");
        if (!found) {
            mv.visitTypeInsn(NEW, "javax/ejb/EJBException");
            mv.visitInsn(DUP);
            mv.visitLdcInsn("No timeout method has been defined on this bean");
            mv.visitMethodInsn(INVOKESPECIAL, "javax/ejb/EJBException", "<init>", "(Ljava/lang/String;)V");
            mv.visitInsn(ATHROW);
        }
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitInsn()

        if (!found) {
            mv.visitTypeInsn(NEW, "javax/ejb/EJBException");
            mv.visitInsn(DUP);
            mv.visitLdcInsn("No timeout method has been defined on this bean");
            mv.visitMethodInsn(INVOKESPECIAL, "javax/ejb/EJBException", "<init>", "(Ljava/lang/String;)V");
            mv.visitInsn(ATHROW);
        }

        // else, throw an exception

        mv.visitInsn(RETURN);
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitInsn()

            mv.visitInsn(ATHROW);
        }

        // else, throw an exception

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitInsn()

     * destroyed.
     */
    private void addRemoveMethod() {
        MethodVisitor mv = cv.visitMethod(ACC_PUBLIC, "remove", "()V", null, new String[] {"javax/ejb/RemoveException" });
        mv.visitCode();
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    /**
 
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.