Package org.codehaus.aspectwerkz.transform.inlining

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


            super(ca);

            // loop over emitted jp and insert call to "JoinPointManager.loadJoinPoint(...)"
            for (Iterator iterator = m_ctx.getEmittedJoinPoints().iterator(); iterator.hasNext();) {

                EmittedJoinPoint jp = (EmittedJoinPoint) iterator.next();
                cv.visitLdcInsn(new Integer(jp.getJoinPointType()));

                cv.visitFieldInsn(GETSTATIC, m_ctx.getClassName(), TARGET_CLASS_FIELD_NAME, CLASS_CLASS_SIGNATURE);
                cv.visitLdcInsn(jp.getCallerMethodName());
                cv.visitLdcInsn(jp.getCallerMethodDesc());
                cv.visitLdcInsn(new Integer(jp.getCallerMethodModifiers()));

                cv.visitLdcInsn(jp.getCalleeClassName());
                cv.visitLdcInsn(jp.getCalleeMemberName());
                cv.visitLdcInsn(jp.getCalleeMemberDesc());
                cv.visitLdcInsn(new Integer(jp.getCalleeMemberModifiers()));

                cv.visitLdcInsn(new Integer(jp.getJoinPointHash()));
                cv.visitLdcInsn(jp.getJoinPointClassName());
                cv.visitMethodInsn(
                        INVOKESTATIC,
                        JOIN_POINT_MANAGER_CLASS_NAME,
                        LOAD_JOIN_POINT_METHOD_NAME,
                        LOAD_JOIN_POINT_METHOD_SIGNATURE
View Full Code Here


        for (Iterator it = COMPILATION_INFO_REPOSITORY.entrySet().iterator(); it.hasNext();) {
            final Map.Entry entry = (Map.Entry) it.next();

            final Class clazz = (Class) entry.getKey();
            final CompilationInfo compilationInfo = (CompilationInfo) entry.getValue();
            final EmittedJoinPoint joinPoint = (EmittedJoinPoint) compilationInfo.
                    getInitialModel().getEmittedJoinPoint();
            final ClassLoader loader = clazz.getClassLoader();

            final ClassInfo calleeClassInfo = AsmClassInfo.getClassInfo(joinPoint.getCalleeClassName(), loader);
            final ClassInfo callerClassInfo = AsmClassInfo.getClassInfo(joinPoint.getCallerClassName(), loader);
            final MethodInfo callerMethodInfo = getCallerMethodInfo(callerClassInfo, joinPoint);

            ExpressionContext ctx = null;
            switch (joinPoint.getJoinPointType()) {
                case JoinPointType.METHOD_EXECUTION:
                    ctx = new ExpressionContext(
                            PointcutType.EXECUTION,
                            calleeClassInfo.getMethod(joinPoint.getJoinPointHash()),
                            callerMethodInfo
                    );
                    break;
                case JoinPointType.METHOD_CALL:
                    ctx = new ExpressionContext(
                            PointcutType.CALL,
                            calleeClassInfo.getMethod(joinPoint.getJoinPointHash()),
                            callerMethodInfo
                    );
                    break;
                case JoinPointType.CONSTRUCTOR_EXECUTION:
                    ctx = new ExpressionContext(
                            PointcutType.EXECUTION,
                            calleeClassInfo.getConstructor(joinPoint.getJoinPointHash()),
                            callerMethodInfo
                    );
                    break;
                case JoinPointType.CONSTRUCTOR_CALL:
                    ctx = new ExpressionContext(
                            PointcutType.CALL,
                            calleeClassInfo.getConstructor(joinPoint.getJoinPointHash()),
                            callerMethodInfo
                    );
                    break;
                case JoinPointType.FIELD_SET:
                    ctx = new ExpressionContext(
                            PointcutType.SET,
                            calleeClassInfo.getField(joinPoint.getJoinPointHash()),
                            callerMethodInfo
                    );
                    break;
                case JoinPointType.FIELD_GET:
                    ctx = new ExpressionContext(
                            PointcutType.GET,
                            calleeClassInfo.getField(joinPoint.getJoinPointHash()),
                            callerMethodInfo
                    );
                    break;
                case JoinPointType.HANDLER:
                    ctx = new ExpressionContext(
                            PointcutType.HANDLER,
                            AsmClassInfo.getClassInfo(joinPoint.getCalleeClassName(), loader),
                            callerMethodInfo
                    );
                    break;
                case JoinPointType.STATIC_INITALIZATION:
                    throw new UnsupportedOperationException("static initialization is not implemented");
View Full Code Here

TOP

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

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.