Package org.objectweb.asm

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


                cv.visitFieldInsn(Constants.PUTFIELD, className, RTTI_FIELD_NAME, METHOD_RTTI_IMPL_CLASS_SIGNATURE);
                break;
            case JoinPointType.CONSTRUCTOR_CALL:
            case JoinPointType.CONSTRUCTOR_EXECUTION:
                cv.visitTypeInsn(Constants.CHECKCAST, CONSTRUCTOR_RTTI_IMPL_CLASS_NAME);
                cv
                        .visitFieldInsn(
                            Constants.PUTFIELD,
                            className,
                            RTTI_FIELD_NAME,
                            CONSTRUCTOR_RTTI_IMPL_CLASS_SIGNATURE);
View Full Code Here


                            CONSTRUCTOR_RTTI_IMPL_CLASS_SIGNATURE);
                break;
            case JoinPointType.FIELD_SET:
            case JoinPointType.FIELD_GET:
                cv.visitTypeInsn(Constants.CHECKCAST, FIELD_RTTI_IMPL_CLASS_NAME);
                cv.visitFieldInsn(Constants.PUTFIELD, className, RTTI_FIELD_NAME, FIELD_RTTI_IMPL_CLASS_SIGNATURE);
                break;
            case JoinPointType.HANDLER:
                throw new UnsupportedOperationException("handler is not support yet");
            case JoinPointType.STATIC_INITALIZATION:
                throw new UnsupportedOperationException("static initialization is not support yet");
View Full Code Here

        CodeVisitor cv = cw.visitMethod(ACC_PRIVATE, INIT_METHOD_NAME, NO_PARAM_RETURN_VOID_SIGNATURE, null, null);
        cv.visitVarInsn(ALOAD, 0);
        cv.visitMethodInsn(INVOKESPECIAL, OBJECT_CLASS, INIT_METHOD_NAME, NO_PARAM_RETURN_VOID_SIGNATURE);
        cv.visitVarInsn(ALOAD, 0);
        cv.visitInsn(ICONST_M1);
        cv.visitFieldInsn(PUTFIELD, className, STACK_FRAME_FIELD_NAME, I);
        cv.visitInsn(RETURN);
        cv.visitMaxs(0, 0);
    }

    /**
 
View Full Code Here

        cv.visitMethodInsn(
            Constants.INVOKESTATIC,
            SYSTEM_LOADER_CLASS_NAME,
            GET_SYSTEM_METHOD_NAME,
            GET_SYSTEM_METHOD_NAME_SIGNATURE);
        cv.visitFieldInsn(Constants.PUTFIELD, className, SYSTEM_FIELD_NAME, SYSTEM_CLASS_SIGNATURE);

        // init the aspect fields
        for (int i = 0; i < aroundAdvices.length; i++) {
            if (initAspectField(aroundAdvices[i], cw, AROUND_ADVICE_FIELD_PREFIX + i, cv, className)) {
                return true;
View Full Code Here

            null);
        cv.visitVarInsn(Constants.ALOAD, 0);
        switch (joinPointType) {
            case JoinPointType.METHOD_EXECUTION:
            case JoinPointType.METHOD_CALL:
                cv.visitFieldInsn(
                    Constants.GETFIELD,
                    className,
                    SIGNATURE_FIELD_NAME,
                    METHOD_SIGNATURE_IMPL_CLASS_SIGNATURE);
                break;
View Full Code Here

                    THROWABLE_CLASS_NAME
                },
                null);

        // StaticJP.m_callee = null or arg0 if target method is not static
        cv.visitFieldInsn(GETSTATIC, joinPointClassName, STATIC_JOIN_POINT_INSTANCE_FIELD_NAME,L + joinPointClassName + SEMICOLON);
        int argStartIndex = 0;
        if (!Modifier.isStatic(calleeMemberModifiers)) {
            cv.visitVarInsn(ALOAD, argStartIndex);
            argStartIndex++;
        } else {
View Full Code Here

                    SIGNATURE_FIELD_NAME,
                    METHOD_SIGNATURE_IMPL_CLASS_SIGNATURE);
                break;
            case JoinPointType.CONSTRUCTOR_CALL:
            case JoinPointType.CONSTRUCTOR_EXECUTION:
                cv.visitFieldInsn(
                    Constants.GETFIELD,
                    className,
                    SIGNATURE_FIELD_NAME,
                    CONSTRUCTOR_SIGNATURE_IMPL_CLASS_SIGNATURE);
                break;
View Full Code Here

                    SIGNATURE_FIELD_NAME,
                    CONSTRUCTOR_SIGNATURE_IMPL_CLASS_SIGNATURE);
                break;
            case JoinPointType.FIELD_SET:
            case JoinPointType.FIELD_GET:
                cv.visitFieldInsn(
                    Constants.GETFIELD,
                    className,
                    SIGNATURE_FIELD_NAME,
                    FIELD_SIGNATURE_IMPL_CLASS_SIGNATURE);
                break;
View Full Code Here

            cv.visitVarInsn(ALOAD, argStartIndex);
            argStartIndex++;
        } else {
            cv.visitInsn(ACONST_NULL);
        }
        cv.visitFieldInsn(PUTFIELD, joinPointClassName, CALLEE_INSTANCE_FIELD_NAME, calleeClassSignature);

        // StaticJP.m_caller = arg<last>
        cv.visitFieldInsn(GETSTATIC, joinPointClassName,STATIC_JOIN_POINT_INSTANCE_FIELD_NAME,L + joinPointClassName + SEMICOLON);
        cv.visitVarInsn(ALOAD, argStartIndex + AsmHelper.getRegisterDepth(argumentTypes));
        cv.visitFieldInsn(PUTFIELD, joinPointClassName, CALLER_INSTANCE_FIELD_NAME, callerClassSignature);
View Full Code Here

            null);
        cv.visitVarInsn(Constants.ALOAD, 0);
        switch (joinPointType) {
            case JoinPointType.METHOD_EXECUTION:
            case JoinPointType.METHOD_CALL:
                cv.visitFieldInsn(Constants.GETFIELD, className, RTTI_FIELD_NAME, METHOD_RTTI_IMPL_CLASS_SIGNATURE);
                break;
            case JoinPointType.CONSTRUCTOR_CALL:
            case JoinPointType.CONSTRUCTOR_EXECUTION:
                cv
                        .visitFieldInsn(
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.