Examples of visitMethodInsn()


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

                String className = this.classAnnotationMetadata.getClassName();
                if (method.isInherited()) {
                    className = method.getOriginalClassMetadata().getClassName();
                }

                mv.visitMethodInsn(INVOKESPECIAL, className, method.getMethodName(), "(Ljavax/ejb/Timer;)V");
                found = true;
                break;
            }
        }
View Full Code Here

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

        // 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);
        }

        // else, throw an exception
View Full Code Here

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

        MethodVisitor mv = cv.visitMethod(ACC_PUBLIC, "getPrimaryKey", "()Ljava/lang/Object;", null, null);
        mv.visitCode();
        mv.visitTypeInsn(NEW, "javax/ejb/EJBException");
        mv.visitInsn(DUP);
        mv.visitLdcInsn("No primary key on session beans");
        mv.visitMethodInsn(INVOKESPECIAL, "javax/ejb/EJBException", "<init>", "(Ljava/lang/String;)V");
        mv.visitInsn(ATHROW);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }
View Full Code Here

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

        mv.visitCode();
        mv.visitTypeInsn(NEW, "java/rmi/RemoteException");
        mv.visitInsn(DUP);
        mv.visitLdcInsn("This method should be called on the remote object and not locally."
                + "It is only available as a client view.");
        mv.visitMethodInsn(INVOKESPECIAL, "java/rmi/RemoteException", "<init>", "(Ljava/lang/String;)V");
        mv.visitInsn(ATHROW);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

    }
View Full Code Here

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

        mv.visitLabel(l2);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(IRETURN);
        mv.visitLabel(l1);
        mv.visitVarInsn(ALOAD, ONE);
        mv.visitMethodInsn(INVOKESTATIC, "java/lang/reflect/Proxy", "getInvocationHandler",
                "(Ljava/lang/Object;)Ljava/lang/reflect/InvocationHandler;");
        mv.visitVarInsn(ASTORE, TWO);
        Label l3 = new Label();
        mv.visitLabel(l3);
        mv.visitInsn(ACONST_NULL);
View Full Code Here

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

        mv.visitLabel(l5);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(IRETURN);
        mv.visitLabel(l7);
        mv.visitVarInsn(ALOAD, THREE);
        mv.visitMethodInsn(INVOKEVIRTUAL, "org/ow2/easybeans/rpc/LocalCallInvocationHandler", "getFactoryName",
                "()Ljava/lang/String;");
        mv.visitVarInsn(ASTORE, FOUR);
        Label l8 = new Label();
        mv.visitLabel(l8);
        mv.visitVarInsn(ALOAD, 0);
View Full Code Here

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

                "()Ljava/lang/String;");
        mv.visitVarInsn(ASTORE, FOUR);
        Label l8 = new Label();
        mv.visitLabel(l8);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitTypeInsn(INSTANCEOF, "org/ow2/easybeans/container/session/stateless/StatelessSessionFactory");
        Label l9 = new Label();
        mv.visitJumpInsn(IFEQ, l9);
        Label l10 = new Label();
View Full Code Here

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

        Label l9 = new Label();
        mv.visitJumpInsn(IFEQ, l9);
        Label l10 = new Label();
        mv.visitLabel(l10);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitMethodInsn(INVOKEINTERFACE, "org/ow2/easybeans/api/Factory", "getClassName", "()Ljava/lang/String;");
        Label l11 = new Label();
        mv.visitLabel(l11);
        mv.visitVarInsn(ALOAD, FOUR);
View Full Code Here

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

        Label l10 = new Label();
        mv.visitLabel(l10);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitMethodInsn(INVOKEINTERFACE, "org/ow2/easybeans/api/Factory", "getClassName", "()Ljava/lang/String;");
        Label l11 = new Label();
        mv.visitLabel(l11);
        mv.visitVarInsn(ALOAD, FOUR);
        mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z");
        Label l12 = new Label();
View Full Code Here

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

                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitMethodInsn(INVOKEINTERFACE, "org/ow2/easybeans/api/Factory", "getClassName", "()Ljava/lang/String;");
        Label l11 = new Label();
        mv.visitLabel(l11);
        mv.visitVarInsn(ALOAD, FOUR);
        mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z");
        Label l12 = new Label();
        mv.visitLabel(l12);
        mv.visitInsn(IRETURN);
        mv.visitLabel(l9);
        mv.visitVarInsn(ALOAD, 0);
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.