Examples of visitInsn()


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

        // }

        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.visitInsn()

        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.visitInsn()

        MethodVisitor mv = cv.visitMethod(ACC_PUBLIC, "getHandle", "()Ljavax/ejb/Handle;", null,
                new String[] {"java/rmi/RemoteException"});
        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);
View Full Code Here

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

        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.visitInsn()

        mv.visitVarInsn(ALOAD, ONE);
        Label l1 = new Label();
        mv.visitJumpInsn(IFNONNULL, l1);
        Label l2 = new Label();
        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;");
View Full Code Here

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

        Label l1 = new Label();
        mv.visitJumpInsn(IFNONNULL, l1);
        Label l2 = new Label();
        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);
View Full Code Here

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

        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);
        mv.visitVarInsn(ASTORE, THREE);
        Label l4 = new Label();
        mv.visitLabel(l4);
        mv.visitVarInsn(ALOAD, TWO);
        mv.visitTypeInsn(INSTANCEOF, "org/ow2/easybeans/rpc/LocalCallInvocationHandler");
View Full Code Here

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

        mv.visitTypeInsn(CHECKCAST, "org/ow2/easybeans/rpc/LocalCallInvocationHandler");
        mv.visitVarInsn(ASTORE, THREE);
        Label l7 = new Label();
        mv.visitJumpInsn(GOTO, l7);
        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;");
View Full Code Here

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

        mv.visitVarInsn(ASTORE, THREE);
        Label l7 = new Label();
        mv.visitJumpInsn(GOTO, l7);
        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);
View Full Code Here

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

        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);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitTypeInsn(INSTANCEOF, "org/ow2/easybeans/container/session/stateful/StatefulSessionFactory");
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.