Package org.codehaus.aspectwerkz.aspect.management

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


        for (Iterator it = definition.getAspectDefinitions().iterator(); it.hasNext();) {
            AspectDefinition aspectDef = (AspectDefinition)it.next();
            if (aspectDef.getName().equals(CFlowSystemAspect.CLASS_NAME)) {
                continue;
            }
            PointcutManager pointcutManager = aspectManager.getPointcutManager(aspectDef.getName());
            for (Iterator it2 = aspectDef.getAroundAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition)it2.next();
                Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
                if (pointcut == null) {
                    pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
                    pointcutManager.addPointcut(pointcut);
                }
                pointcut.addAroundAdvice(aspectDef.getName() + '/' + adviceDef.getName());
            }
            for (Iterator it2 = aspectDef.getBeforeAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition)it2.next();
                Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
                if (pointcut == null) {
                    pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
                    pointcutManager.addPointcut(pointcut);
                }
                pointcut.addBeforeAdvice(aspectDef.getName() + '/' + adviceDef.getName());
            }
            for (Iterator it2 = aspectDef.getAfterAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition)it2.next();
                Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
                if (pointcut == null) {
                    pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
                    pointcutManager.addPointcut(pointcut);
                }
                pointcut.addAfterAdvice(aspectDef.getName() + '/' + adviceDef.getName());
            }
        }
    }
View Full Code Here


     */
    private static void registerCflowPointcuts(final AspectManager aspectManager, final SystemDefinition definition) {
        // get all aspects to be able to get all poincuts defined
        for (Iterator it1 = definition.getAspectDefinitions().iterator(); it1.hasNext();) {
            AspectDefinition aspectDef = (AspectDefinition)it1.next();
            PointcutManager pointcutManager = aspectManager.getPointcutManager(aspectDef.getName());
            List cflowPointcuts = pointcutManager.getCflowPointcuts();
            for (Iterator it2 = cflowPointcuts.iterator(); it2.hasNext();) {
                Pointcut cflowPointcut = (Pointcut)it2.next();
                ExpressionInfo expressionInfo = cflowPointcut.getExpressionInfo();

                // register the cflow advices in the system and create the cflow system pointcutManager
View Full Code Here

                deploymentModel,
                aspectDef,
                parameters);
            final AspectContainer container = createAspectContainer(crossCuttingInfoPrototype);
            crossCuttingInfoPrototype.setContainer(container);
            PointcutManager pointcutManager = new PointcutManager(aspectDef.getName(), deploymentModel);
            aspectManager.register(container, pointcutManager);
        } catch (Exception e) {
            throw new WrappedRuntimeException(e);
        }
    }
View Full Code Here

        for (Iterator it = definition.getAspectDefinitions().iterator(); it.hasNext();) {
            AspectDefinition aspectDef = (AspectDefinition) it.next();
            if (aspectDef.getName().equals(CFlowSystemAspect.CLASS_NAME)) {
                continue;
            }
            PointcutManager pointcutManager = aspectManager.getPointcutManager(aspectDef.getName());
            for (Iterator it2 = aspectDef.getAroundAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition) it2.next();
                Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
                if (pointcut == null) {
                    pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
                    pointcutManager.addPointcut(pointcut);
                }
                pointcut.addAroundAdvice(aspectDef.getName() + '/' + adviceDef.getName());
            }
            for (Iterator it2 = aspectDef.getBeforeAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition) it2.next();
                Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
                if (pointcut == null) {
                    pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
                    pointcutManager.addPointcut(pointcut);
                }
                pointcut.addBeforeAdvice(aspectDef.getName() + '/' + adviceDef.getName());
            }
            for (Iterator it2 = aspectDef.getAfterAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition) it2.next();
                Pointcut pointcut = pointcutManager.getPointcut(adviceDef.getExpressionInfo().getExpressionAsString());
                if (pointcut == null) {
                    pointcut = new Pointcut(aspectManager, adviceDef.getExpressionInfo());
                    pointcutManager.addPointcut(pointcut);
                }
                if (adviceDef.getType().equals(AdviceType.AFTER) ||
                    adviceDef.getType().equals(AdviceType.AFTER_FINALLY)) {
                    pointcut.addAfterFinallyAdvices(aspectDef.getName() + '/' + adviceDef.getName());
                }
View Full Code Here

     */
    private static void registerCflowPointcuts(final AspectManager aspectManager, final SystemDefinition definition) {
        // get all aspects to be able to get all poincuts defined
        for (Iterator it1 = definition.getAspectDefinitions().iterator(); it1.hasNext();) {
            AspectDefinition aspectDef = (AspectDefinition) it1.next();
            PointcutManager pointcutManager = aspectManager.getPointcutManager(aspectDef.getName());
            List cflowPointcuts = pointcutManager.getCflowPointcuts();
            for (Iterator it2 = cflowPointcuts.iterator(); it2.hasNext();) {
                Pointcut cflowPointcut = (Pointcut) it2.next();
                ExpressionInfo expressionInfo = cflowPointcut.getExpressionInfo();

                // register the cflow advices in the system and create the cflow system
View Full Code Here

TOP

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

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.