Package org.codehaus.aspectwerkz.transform.inlining

Examples of org.codehaus.aspectwerkz.transform.inlining.AspectInfo


                                                  final boolean isOptimizedJoinPoint,
                                                  final int joinPointIndex,
                                                  final int callerIndex,
                                                  final int calleeIndex) {
        for (int i = 0; i < m_aspectInfos.length; i++) {
            AspectInfo aspectInfo = m_aspectInfos[i];
            if (aspectInfo.getDeploymentModel() == DeploymentModel.PER_INSTANCE) {
                // gen code: aspectField = (<TYPE>)((HasInstanceLocalAspect)target).aw$getAspect(className, qualifiedName)
                loadJoinPointInstance(cv, isOptimizedJoinPoint, joinPointIndex);
                if (calleeIndex >= 0) {
                    cv.visitVarInsn(ALOAD, calleeIndex);
                } else {
                    // target instance not available - skipping
                }
                cv.visitLdcInsn(aspectInfo.getAspectClassName().replace('/', '.'));
                cv.visitLdcInsn(aspectInfo.getAspectQualifiedName());
                cv.visitMethodInsn(
                        INVOKEINTERFACE,
                        HAS_INSTANCE_LEVEL_ASPECT_INTERFACE_NAME,
                        GET_INSTANCE_LEVEL_ASPECT_METHOD_NAME,
                        GET_INSTANCE_LEVEL_ASPECT_METHOD_SIGNATURE
                );
                cv.visitTypeInsn(CHECKCAST, aspectInfo.getAspectClassName());
                cv.visitFieldInsn(
                        PUTFIELD,
                        m_joinPointClassName,
                        aspectInfo.getAspectFieldName(),
                        aspectInfo.getAspectClassSignature()
                );
            }
        }
    }
View Full Code Here


                                                  final int calleeIndex) {

        for (int i = 0; i < m_aspectInfos.length; i++) {

            AspectInfo aspectInfo = m_aspectInfos[i];

            if (aspectInfo.getDeploymentModel() == DeploymentModel.PER_INSTANCE) {

                // gen code: aspectField = (<TYPE>)((HasInstanceLocalAspect)CALLER).aw$getAspect(className, qualifiedName, containerClassName)

                loadJoinPointInstance(cv, isOptimizedJoinPoint, joinPointIndex);

                if (callerIndex >= 0) {

                    cv.visitVarInsn(ALOAD, callerIndex);

                } else {

                    // caller instance not available - skipping

                    //TODO clean up should not occur

                }

                cv.visitLdcInsn(aspectInfo.getAspectClassName().replace('/', '.'));

                cv.visitLdcInsn(aspectInfo.getAspectQualifiedName());

                cv.visitLdcInsn(aspectInfo.getAspectDefinition().getContainerClassName());

                cv.visitMethodInsn(

                        INVOKEINTERFACE,

                        HAS_INSTANCE_LEVEL_ASPECT_INTERFACE_NAME,

                        GET_INSTANCE_LEVEL_ASPECT_METHOD_NAME,

                        GET_INSTANCE_LEVEL_ASPECT_METHOD_SIGNATURE

                );

                cv.visitTypeInsn(CHECKCAST, aspectInfo.getAspectClassName());

                cv.visitFieldInsn(

                        PUTFIELD,

                        m_joinPointClassName,

                        aspectInfo.getAspectFieldName(),

                        aspectInfo.getAspectClassSignature()

                );

            }
View Full Code Here

                                                  final boolean isOptimizedJoinPoint,
                                                  final int joinPointIndex,
                                                  final int callerIndex,
                                                  final int calleeIndex) {
        for (int i = 0; i < m_aspectInfos.length; i++) {
            AspectInfo aspectInfo = m_aspectInfos[i];
            if (aspectInfo.getDeploymentModel() == DeploymentModel.PER_INSTANCE) {
                // gen code: aspectField = (<TYPE>)((HasInstanceLocalAspect)CALLER).aw$getAspect(className, qualifiedName, containerClassName)
                loadJoinPointInstance(cv, isOptimizedJoinPoint, joinPointIndex);
                if (callerIndex >= 0) {
                    cv.visitVarInsn(ALOAD, callerIndex);
                } else {
                    // caller instance not available - skipping
                    //TODO clean up should not occur
                }
                cv.visitLdcInsn(aspectInfo.getAspectClassName().replace('/', '.'));
                cv.visitLdcInsn(aspectInfo.getAspectQualifiedName());
                cv.visitLdcInsn(aspectInfo.getAspectDefinition().getContainerClassName());
                cv.visitMethodInsn(
                        INVOKEINTERFACE,
                        HAS_INSTANCE_LEVEL_ASPECT_INTERFACE_NAME,
                        GET_INSTANCE_LEVEL_ASPECT_METHOD_NAME,
                        GET_INSTANCE_LEVEL_ASPECT_METHOD_SIGNATURE
                );
                cv.visitTypeInsn(CHECKCAST, aspectInfo.getAspectClassName());
                cv.visitFieldInsn(
                        PUTFIELD,
                        m_joinPointClassName,
                        aspectInfo.getAspectFieldName(),
                        aspectInfo.getAspectClassSignature()
                );
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.transform.inlining.AspectInfo

Copyright © 2018 www.massapicom. 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.