Examples of CodeVisitor


Examples of org.objectweb.asm.CodeVisitor

        if (debug) {
            logger
                    .log(BasicLevel.DEBUG,
                            "Generate the method: getCeIdentifier");
        }
        CodeVisitor mv = cv.visitMethod(ACC_PUBLIC, "getCeIdentifier",
                "()Ljava/lang/Object;", null, null);
        // return getPName();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, "getPName",
                "()Lorg/objectweb/jorm/naming/api/PName;");
        mv.visitInsn(ARETURN);
        mv.visitMaxs(0, 0);
    }
View Full Code Here

Examples of org.objectweb.asm.CodeVisitor

     */
    private void generateFixCeMethod() {
        if (debug) {
            logger.log(BasicLevel.DEBUG, "Generate the method: fixCe");
        }
        CodeVisitor mv = cv.visitMethod(ACC_PUBLIC, "fixCe", "()V", null, null);
        // speedoFixCount++;
        mv.visitVarInsn(ALOAD, 0);
        mv.visitInsn(DUP);
        mv.visitFieldInsn(GETFIELD, classToWrite, FIX_FIELD_NAME, "I");
        mv.visitInsn(ICONST_1);
        mv.visitInsn(IADD);
        mv.visitFieldInsn(PUTFIELD, classToWrite, FIX_FIELD_NAME, "I");

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
    }
View Full Code Here

Examples of org.objectweb.asm.CodeVisitor

     */
    private void generateUnfixCeMethod() {
        if (debug) {
            logger.log(BasicLevel.DEBUG, "Generate the method: unfixCe");
        }
        CodeVisitor mv = cv.visitMethod(ACC_PUBLIC, "unfixCe", "()V", null,
                null);
        // speedoFixCount--;
        mv.visitVarInsn(ALOAD, 0);
        mv.visitInsn(DUP);
        mv.visitFieldInsn(GETFIELD, classToWrite, FIX_FIELD_NAME, "I");
        mv.visitInsn(ICONST_1);
        mv.visitInsn(ISUB);
        mv.visitFieldInsn(PUTFIELD, classToWrite, FIX_FIELD_NAME, "I");

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
    }
View Full Code Here

Examples of org.objectweb.asm.CodeVisitor

     */
    private void generateGetCeFixCountMethod() {
        if (debug) {
            logger.log(BasicLevel.DEBUG, "Generate the method: getCeFixCount");
        }
        CodeVisitor mv = cv.visitMethod(ACC_PUBLIC, "getCeFixCount", "()I",
                null, null);
        // return speedoFixCount;
        mv.visitVarInsn(ALOAD, 0);
        mv.visitFieldInsn(GETFIELD, classToWrite, FIX_FIELD_NAME, "I");
        mv.visitInsn(IRETURN);
        mv.visitMaxs(0, 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.