Package org.objectweb.asm

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


            case JoinPointType.STATIC_INITALIZATION:
                throw new UnsupportedOperationException("static initialization is not support yet");
        }

        cv.visitInsn(Constants.ARETURN);
        cv.visitMaxs(0, 0);
    }

    /**
     * Creates a new getSignature method.
     *
 
View Full Code Here


            case JoinPointType.STATIC_INITALIZATION:
                throw new UnsupportedOperationException("static initialization is not support yet");
        }

        cv.visitInsn(Constants.ARETURN);
        cv.visitMaxs(0, 0);
    }

    /**
     * Create the proceed() method.
     *
 
View Full Code Here

            Label returnLabel = labels.returnLabels[i];
            cv.visitTryCatchBlock(switchCaseLabel, returnLabel, labels.handlerLabel, null);
        }
        cv.visitTryCatchBlock(labels.handlerLabel, labels.endLabel, labels.handlerLabel, null);

        cv.visitMaxs(0, 0);
    }

    /**
     * Invokes the specific join point.
     *
 
View Full Code Here

                proxyCode.visitVarInsn(ALOAD, 0);
                AsmHelper.loadArgumentTypes(proxyCode, Type.getArgumentTypes(desc), false);
                proxyCode.visitMethodInsn(INVOKESPECIAL, m_className, INIT_METHOD_NAME, desc);
                proxyCode.visitInsn(RETURN);
                proxyCode.visitMaxs(0, 0);
            } else {
                // method that can be proxied
                CodeVisitor proxyCode = m_proxyCv.visitMethod(
                        access + ACC_SYNTHETIC,
                        name,
View Full Code Here

                if (Modifier.isStatic(access)) {
                    AsmHelper.loadArgumentTypes(proxyCode, Type.getArgumentTypes(desc), true);
                    proxyCode.visitMethodInsn(INVOKESTATIC, m_className, name, desc);
                    proxyCode.visitInsn(RETURN);
                    proxyCode.visitMaxs(0, 0);
                } else {
                    proxyCode.visitVarInsn(ALOAD, 0);
                    AsmHelper.loadArgumentTypes(proxyCode, Type.getArgumentTypes(desc), false);
                    proxyCode.visitMethodInsn(INVOKESPECIAL, m_className, name, desc);
                    proxyCode.visitInsn(RETURN);
View Full Code Here

                } else {
                    proxyCode.visitVarInsn(ALOAD, 0);
                    AsmHelper.loadArgumentTypes(proxyCode, Type.getArgumentTypes(desc), false);
                    proxyCode.visitMethodInsn(INVOKESPECIAL, m_className, name, desc);
                    proxyCode.visitInsn(RETURN);
                    proxyCode.visitMaxs(0, 0);

                }
            }

            return AsmAnnotationHelper.NullCodeAdapter.NULL_CODE_ADAPTER;
View Full Code Here

        cv.visitMethodInsn(INVOKESPECIAL, ABSTRACT_CFLOW_CLASS, INIT_METHOD_NAME, NO_PARAM_RETURN_VOID_SIGNATURE);
        // assign the singleton field to this
        cv.visitVarInsn(ALOAD, 0);
        cv.visitFieldInsn(PUTSTATIC, m_className, INSTANCE_CFLOW_FIELD_NAME, ABSTRACT_CFLOW_SIGNATURE);
        cv.visitInsn(RETURN);
        cv.visitMaxs(0, 0);

        // static isInCflow() delegators
        cv = m_cw.visitMethod(
                ACC_PUBLIC + ACC_STATIC,
                IS_IN_CFLOW_METOD_NAME,
View Full Code Here

        cv.visitMethodInsn(INVOKEVIRTUAL, ABSTRACT_CFLOW_CLASS, IN_CFLOW_METOD_NAME, IN_CFLOW_METOD_SIGNATURE);
        cv.visitInsn(IRETURN);
        cv.visitLabel(isNull);
        cv.visitInsn(ICONST_0);
        cv.visitInsn(IRETURN);
        cv.visitMaxs(0, 0);

        // static isInCflowBelow() delegators
        cv = m_cw.visitMethod(
                ACC_PUBLIC + ACC_STATIC,
                IS_IN_CFLOWBELOW_METOD_NAME,
View Full Code Here

        cv.visitMethodInsn(INVOKEVIRTUAL, ABSTRACT_CFLOW_CLASS, IN_CFLOWBELOW_METOD_NAME, IN_CFLOWBELOW_METOD_SIGNATURE);
        cv.visitInsn(IRETURN);
        cv.visitLabel(isNull2);
        cv.visitInsn(ICONST_0);
        cv.visitInsn(IRETURN);
        cv.visitMaxs(0, 0);

        m_cw.visitEnd();

        return m_cw.toByteArray();
    }
View Full Code Here

        cv.visitMethodInsn(
                INVOKESTATIC, m_joinPointClassName,
                STATIC_INITIALIZATION_METHOD_NAME, NO_PARAM_RETURN_VOID_SIGNATURE
        );
        cv.visitInsn(RETURN);
        cv.visitMaxs(0, 0);
    }

    /**
     * Creates the init method for the join point.
     */
 
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.