Package org.codehaus.aspectwerkz.cflow

Examples of org.codehaus.aspectwerkz.cflow.CflowBinding


            // so that pcX && cflow(pcX) match on pcX
            for (Iterator iterator = aspectDef.getAdviceDefinitions().iterator(); iterator.hasNext();) {
                AdviceDefinition adviceDefinition = (AdviceDefinition) iterator.next();
                List cflowBindings = CflowBinding.getCflowBindingsForCflowOf(adviceDefinition.getExpressionInfo());
                for (Iterator cflows = cflowBindings.iterator(); cflows.hasNext();) {
                    CflowBinding cflowBinding = (CflowBinding) cflows.next();
                    addAspect(cflowBinding.getAspectDefinition(this, aspectDef.getClassInfo().getClassLoader()));
                }
            }

            m_aspectMap.put(aspectDef.getName(), aspectDef);
View Full Code Here


    public static junit.framework.Test suite() {
        return new junit.framework.TestSuite(ExpressionTest.class);
    }

    private static ExpressionInfo singleCflowOf(ExpressionInfo singleCflowExpression) {
        CflowBinding cfb = (CflowBinding) CflowBinding.getCflowBindingsForCflowOf(singleCflowExpression).get(0);
        return cfb.getExpression();
    }
View Full Code Here

            allCflowBindings.addAll(cflowBindings);
        }

        List compiledCflows = new ArrayList();
        for (Iterator iterator = allCflowBindings.iterator(); iterator.hasNext();) {
            CflowBinding cflowBinding = (CflowBinding) iterator.next();
            compiledCflows.add(CflowCompiler.compileCflowAspect(cflowBinding.getCflowID()));
        }

        return (CflowCompiler.CompiledCflowAspect[])compiledCflows.toArray(new CflowCompiler.CompiledCflowAspect[0]);
    }
View Full Code Here

            // so that pcX && cflow(pcX) match on pcX
            for (Iterator iterator = aspectDef.getAdviceDefinitions().iterator(); iterator.hasNext();) {
                AdviceDefinition adviceDefinition = (AdviceDefinition) iterator.next();
                List cflowBindings = CflowBinding.getCflowBindingsForCflowOf(adviceDefinition.getExpressionInfo());
                for (Iterator cflows = cflowBindings.iterator(); cflows.hasNext();) {
                    CflowBinding cflowBinding = (CflowBinding) cflows.next();
                    if (!cflowBinding.isCflowBelow()) {
                        addAspect(cflowBinding.getAspectDefinition(this, aspectDef.getClassInfo().getClassLoader()));
                    }
                }
            }

            // register the aspect itself
            m_aspectMap.put(aspectDef.getName(), aspectDef);

            // register the "cflowbelow" aspects for this aspect bindings
            // note: this one will even support cflowbelow(xx && cflowbelow())
            // note: the cflowbelow aspect MUST be registered LAST for precedence purpose
            // so that pcX && cflowbelow(pcX) does not match on just the pcX joinpoint
            for (Iterator iterator = aspectDef.getAdviceDefinitions().iterator(); iterator.hasNext();) {
                AdviceDefinition adviceDefinition = (AdviceDefinition) iterator.next();
                List cflowBindings = CflowBinding.getCflowBindingsForCflowOf(adviceDefinition.getExpressionInfo());
                for (Iterator cflows = cflowBindings.iterator(); cflows.hasNext();) {
                    CflowBinding cflowBinding = (CflowBinding) cflows.next();
                    if (cflowBinding.isCflowBelow()) {
                        addAspect(cflowBinding.getAspectDefinition(this, aspectDef.getClassInfo().getClassLoader()));
                    }
                }
            }
        }
    }
View Full Code Here

    public static junit.framework.Test suite() {
        return new junit.framework.TestSuite(ExpressionTest.class);
    }

    private static ExpressionInfo singleCflowOf(ExpressionInfo singleCflowExpression) {
        CflowBinding cfb = (CflowBinding) CflowBinding.getCflowBindingsForCflowOf(singleCflowExpression).get(0);
        return cfb.getExpression();
    }
View Full Code Here

            allCflowBindings.addAll(cflowBindings);
        }

        List compiledCflows = new ArrayList();
        for (Iterator iterator = allCflowBindings.iterator(); iterator.hasNext();) {
            CflowBinding cflowBinding = (CflowBinding) iterator.next();
            compiledCflows.add(CflowCompiler.compileCflowAspect(cflowBinding.getCflowID()));
        }

        return (CflowCompiler.CompiledCflowAspect[])compiledCflows.toArray(new CflowCompiler.CompiledCflowAspect[0]);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.cflow.CflowBinding

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.