Package org.objectweb.asm

Examples of org.objectweb.asm.CodeVisitor.visitLdcInsn()


                xmlFileName);
        for (Iterator it = classProperties.entrySet().iterator(); it.hasNext();) {
            Map.Entry me = (Map.Entry) it.next();
            cv.visitVarInsn(ALOAD, 1);
            cv.visitLdcInsn(me.getKey());
            cv.visitLdcInsn(me.getValue());
            cv.visitMethodInsn(INVOKEVIRTUAL, "java/util/Properties", "setProperty",
                    "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;");
            cv.visitInsn(POP); //remove the result of the setProperty method
        }
       
View Full Code Here


        cv.visitJumpInsn(IFNONNULL, labelElse);
        Label labelEnd = new Label();
        {
            //sa.indexFieldModified(0xffffffff, false);
            cv.visitVarInsn(ALOAD, 4);
            cv.visitLdcInsn(new Integer(0xffffffff));
            cv.visitInsn(ICONST_0);
            cv.visitMethodInsn(INVOKEINTERFACE,
                    getJVMClassName(StateItf.class),
                    "indexFieldModified", "(IZ)V");
            cv.visitJumpInsn(GOTO, labelEnd);
View Full Code Here

            cv.visitInsn(ICONST_0);
            cv.visitInsn(IRETURN);
        }
        cv.visitLabel(l0);
        //} else if ("*".equals(cacheName)) {
        cv.visitLdcInsn("*");
        cv.visitVarInsn(ALOAD, 1);
        cv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z");
        Label labelElse = new Label();
        cv.visitJumpInsn(IFEQ, labelElse);
        {
View Full Code Here

        {
            //foreach($ucn in $userCacheNames)
            for (int ucIdx = 0; ucIdx < gc.userCacheNames.length; ucIdx++) {
                //activeUserCache("$ucn");
                cv.visitVarInsn(ALOAD, 0);
                cv.visitLdcInsn(gc.userCacheNames[ucIdx]);
                cv.visitMethodInsn(INVOKEVIRTUAL,
                        gc.classToWriteJCN,
                        "activeUserCache", "(Ljava/lang/String;)Z");
                cv.visitInsn(POP);
            }
View Full Code Here

        }
        cv.visitLabel(labelElse);
        for (int ucIdx = 0; ucIdx < gc.userCacheNames.length; ucIdx++) {
            final String ucn = gc.userCacheNames[ucIdx];
            //} else if ("${ucn}".equals(cacheName)) {
            cv.visitLdcInsn(ucn);
            cv.visitVarInsn(ALOAD, 1);
            cv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z");
            Label labelNext = new Label();
            cv.visitJumpInsn(IFEQ, labelNext);
            {
View Full Code Here

                cv.visitTypeInsn(ANEWARRAY, "java/lang/String");
                for (int fieldIdx = 0; fieldIdx < fields.size(); fieldIdx++) {
                    SpeedoField sf = (SpeedoField) fields.get(fieldIdx);
                    cv.visitInsn(DUP);
                    Util.visitIntConstant(cv, fieldIdx); //index
                    cv.visitLdcInsn(sf.name); //value = field name
                    cv.visitInsn(AASTORE);
                }
               
                Util.visitIntConstant(cv, ucIdx); //${ucn}_USER_CACHE_ID
                cv.visitMethodInsn(INVOKEVIRTUAL, gc.classToWriteJCN,
View Full Code Here

            cv.visitMethodInsn(INVOKESPECIAL, sqJCN, "<init>", "()V");
            cv.visitVarInsn(ASTORE, 1); //Always use the same variable 1
           
            if (q.query != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.query);
                cv.visitMethodInsn(INVOKEVIRTUAL, sqJCN, "defineWith", "(Ljava/lang/String;)V");
            }
            if (q.filter != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.filter);
View Full Code Here

                cv.visitLdcInsn(q.query);
                cv.visitMethodInsn(INVOKEVIRTUAL, sqJCN, "defineWith", "(Ljava/lang/String;)V");
            }
            if (q.filter != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.filter);
                cv.visitMethodInsn(INVOKEVIRTUAL, sqJCN, "setFilter", "(Ljava/lang/String;)V");
            }
            if (q.declareImports != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.declareImports);
View Full Code Here

                cv.visitLdcInsn(q.filter);
                cv.visitMethodInsn(INVOKEVIRTUAL, sqJCN, "setFilter", "(Ljava/lang/String;)V");
            }
            if (q.declareImports != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.declareImports);
                cv.visitMethodInsn(INVOKEVIRTUAL, sqJCN, "declareImports", "(Ljava/lang/String;)V");
            }
            if (q.declareParameters != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.declareParameters);
View Full Code Here

                cv.visitLdcInsn(q.declareImports);
                cv.visitMethodInsn(INVOKEVIRTUAL, sqJCN, "declareImports", "(Ljava/lang/String;)V");
            }
            if (q.declareParameters != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.declareParameters);
                cv.visitMethodInsn(INVOKEVIRTUAL, sqJCN, "declareParameters", "(Ljava/lang/String;)V");
            }
            if (q.declareVariables != null) {
                cv.visitVarInsn(ALOAD, 1);
                cv.visitLdcInsn(q.declareVariables);
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.