Package org.codehaus.aspectwerkz.aspect.management

Examples of org.codehaus.aspectwerkz.aspect.management.Pointcut


        if (joinPoint == null) {
            Map joinPointMetaDataMap = s_registry.getJoinPointMetaData(m_classHash, fieldHash);
            JoinPointMetaData joinPointMetaData = (JoinPointMetaData) joinPointMetaDataMap.get(PointcutType.GET);
            AdviceIndexInfo[] adviceIndexes = joinPointMetaData.adviceIndexes;
            List cflowExpressions = joinPointMetaData.cflowExpressions;
            Pointcut cflowPointcut = joinPointMetaData.cflowPointcut;
            initCflowManagement(cflowPointcut, joinPointInfo);
            joinPoint = createFieldJoinPoint(
                fieldHash,
                JoinPointType.FIELD_GET,
                m_targetClass,
View Full Code Here


        if (joinPoint == null) {
            Map joinPointMetaDataMap = s_registry.getJoinPointMetaData(m_classHash, handlerHash);
            JoinPointMetaData joinPointMetaData = (JoinPointMetaData) joinPointMetaDataMap.get(PointcutType.HANDLER);
            AdviceIndexInfo[] adviceIndexes = joinPointMetaData.adviceIndexes;
            List cflowExpressions = joinPointMetaData.cflowExpressions;
            Pointcut cflowPointcut = joinPointMetaData.cflowPointcut;
            initCflowManagement(cflowPointcut, joinPointInfo);
            joinPoint = createCatchClauseJoinPoint(
                exceptionInstance.getClass(),
                m_targetClass,
                handlerSignature,
View Full Code Here

        List executionPointcuts = system.getAspectManager().getExecutionPointcuts(
                definedClassMetaData,
                ReflectionMetaDataMaker.createMethodMetaData(wrapperMethod)
        );
        for (Iterator it = executionPointcuts.iterator(); it.hasNext();) {
            Pointcut pointcut = (Pointcut)it.next();
            AdviceContainer advices = new AdviceContainer(
                    pointcut.getAroundAdviceIndexes(),
                    pointcut.getBeforeAdviceIndexes(),
                    pointcut.getAfterAdviceIndexes()
            );
            executionAdvices.add(advices);
        }
        AdviceContainer[] adviceContainers = new AdviceContainer[executionAdvices.size()];
        int i = 0;
View Full Code Here

                        getMethodTuple(definedClass, joinPointHash)
                        .getWrapperMethod()
                )
        );
        for (Iterator it = methodCallPointcuts.iterator(); it.hasNext();) {
            Pointcut pointcut = (Pointcut)it.next();
            AdviceContainer advices = new AdviceContainer(
                    pointcut.getAroundAdviceIndexes(),
                    pointcut.getBeforeAdviceIndexes(),
                    pointcut.getAfterAdviceIndexes()
            );
            methodCallAdvices.add(advices);
        }
        AdviceContainer[] adviceContainers = new AdviceContainer[methodCallAdvices.size()];
        int i = 0;
View Full Code Here

        List executionPointcuts = system.getAspectManager().getExecutionPointcuts(
                definedClassMetaData,
                ReflectionMetaDataMaker.createConstructorMetaData(wrapperConstructor)
        );
        for (Iterator it = executionPointcuts.iterator(); it.hasNext();) {
            Pointcut pointcut = (Pointcut)it.next();
            AdviceContainer advices = new AdviceContainer(
                    pointcut.getAroundAdviceIndexes(),
                    pointcut.getBeforeAdviceIndexes(),
                    pointcut.getAfterAdviceIndexes()
            );
            executionAdvices.add(advices);
        }
        AdviceContainer[] adviceContainers = new AdviceContainer[executionAdvices.size()];
        int i = 0;
View Full Code Here

                        getConstructorTuple(definedClass, joinPointHash)
                        .getWrapperConstructor()
                )
        );
        for (Iterator it = constructorCallPointcuts.iterator(); it.hasNext();) {
            Pointcut pointcut = (Pointcut)it.next();
            AdviceContainer advices = new AdviceContainer(
                    pointcut.getAroundAdviceIndexes(),
                    pointcut.getBeforeAdviceIndexes(),
                    pointcut.getAfterAdviceIndexes()
            );
            constructorCallAdvices.add(advices);
        }
        AdviceContainer[] adviceContainers = new AdviceContainer[constructorCallAdvices.size()];
        int i = 0;
View Full Code Here

        List setPointcuts = system.getAspectManager().getSetPointcuts(
                definedClassMetaData,
                ReflectionMetaDataMaker.createFieldMetaData(signature)
        );
        for (Iterator it = setPointcuts.iterator(); it.hasNext();) {
            Pointcut pointcut = (Pointcut)it.next();
            AdviceContainer advices = new AdviceContainer(
                    pointcut.getAroundAdviceIndexes(),
                    pointcut.getBeforeAdviceIndexes(),
                    pointcut.getAfterAdviceIndexes()
            );
            setAdvices.add(advices);
        }
        AdviceContainer[] adviceContainers = new AdviceContainer[setAdvices.size()];
        int i = 0;
View Full Code Here

        List getPointcuts = system.getAspectManager().getGetPointcuts(
                definedClassMetaData,
                ReflectionMetaDataMaker.createFieldMetaData(signature)
        );
        for (Iterator it = getPointcuts.iterator(); it.hasNext();) {
            Pointcut pointcut = (Pointcut)it.next();
            AdviceContainer advices = new AdviceContainer(
                    pointcut.getAroundAdviceIndexes(),
                    pointcut.getBeforeAdviceIndexes(),
                    pointcut.getAfterAdviceIndexes()
            );
            getAdvices.add(advices);
        }
        AdviceContainer[] adviceContainers = new AdviceContainer[getAdvices.size()];
        int i = 0;
View Full Code Here

            final ClassMetaData exceptionClassMetaData,
            final Map pointcutTypeToAdvicesMap) {
        List handlerAdvices = new ArrayList();
        List handlerPointcuts = system.getAspectManager().getHandlerPointcuts(exceptionClassMetaData);
        for (Iterator it = handlerPointcuts.iterator(); it.hasNext();) {
            Pointcut pointcut = (Pointcut)it.next();
            AdviceContainer advices = new AdviceContainer(
                    EMPTY_INDEX_TUPLE_ARRAY,
                    pointcut.getBeforeAdviceIndexes(),
                    EMPTY_INDEX_TUPLE_ARRAY
            );
            handlerAdvices.add(advices);
        }
        AdviceContainer[] adviceContainers = new AdviceContainer[handlerAdvices.size()];
View Full Code Here

        m_logString = "";
        reorderAdvicesTestMethod();
        assertEquals("before1 before2 invocation after2 after1 ", m_logString);

        // get the pointcut by name (can also be retrieved by method meta-data)
        Pointcut pointcut = SystemLoader.getSystem("tests").
                getAspectManager().
                getPointcutManager(ASPECT_NAME).
                getPointcut("pc1 || pc2 || pc3");

        // get the advices
        List advices = pointcut.getAroundAdviceIndexTuples();
        NameIndexTuple tuple1 = (NameIndexTuple)advices.get(0);
        NameIndexTuple tuple2 = (NameIndexTuple)advices.get(1);

        // reorder the advices
        advices.set(0, tuple2);
        advices.set(1, tuple1);

        // set the reordered advices
        pointcut.setAroundAdviceIndexTuples(advices);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.aspect.management.Pointcut

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.