Package org.codehaus.aspectwerkz.pointcut

Examples of org.codehaus.aspectwerkz.pointcut.ExecutionPointcut.addAdvice()


        ExecutionPointcut methodPointcut = (ExecutionPointcut)SystemLoader.getSystem("tests").
                getAspectMetaData(ASPECT_NAME).
                getExecutionPointcuts(m_classMetaData, methodMetaData).get(0);

        methodPointcut.addAdvice("advice2");

        m_logString = "";
        addAdviceTestMethod();
        assertEquals("before1 before2 invocation after2 after1 ", m_logString);
View Full Code Here


                    getAspectMetaData(ASPECT_NAME).
                    getExecutionPointcuts(m_classMetaData, methodMetaData).
                    get(0);

            // add the new advice to the pointcut
            methodPointcut.addAdvice("newAdvice");

            // check that it is executed
            m_logString = "";
            createAspectTestMethod();
            assertEquals("before2 beforeNew invocation afterNew after2 ", m_logString);
View Full Code Here

                );
                if (pointcut == null) {
                    pointcut = new ExecutionPointcut(uuid, adviceDef.getExpression());
                    aspectMetaData.addExecutionPointcut(pointcut);
                }
                pointcut.addAdvice(adviceDef.getName());

                // TODO: how to handle cflow?
//                    methodPointcut.setCFlowExpression(adviceDef.getExpression().getCFlowExpression());
            }
        }
View Full Code Here

                    ExecutionPointcut pointcut = new ExecutionPointcut(uuid, expression);

                    // add advice references
                    List adviceRefs = bindAdviceRule.getAdviceRefs();
                    for (Iterator it3 = adviceRefs.iterator(); it3.hasNext();) {
                        pointcut.addAdvice((String)it3.next());
                    }
                    // add advices from advice stacks
                    List adviceStackRefs = bindAdviceRule.getAdviceStackRefs();
                    for (Iterator it3 = adviceStackRefs.iterator(); it3.hasNext();) {
                        AdviceStackDefinition adviceStackDefinition =
View Full Code Here

                        AdviceStackDefinition adviceStackDefinition =
                                definition.getAdviceStackDefinition((String)it3.next());

                        List advices = adviceStackDefinition.getAdviceRefs();
                        for (Iterator it4 = advices.iterator(); it4.hasNext();) {
                            pointcut.addAdvice((String)it4.next());
                        }
                    }
                    // add the method pointcut
                    aspect.addExecutionPointcut(pointcut);
                }
View Full Code Here

                    ExecutionPointcut pointcut = new ExecutionPointcut(uuid, expression);

                    // add advice references
                    List adviceRefs = bindAdviceRule.getAdviceRefs();
                    for (Iterator it3 = adviceRefs.iterator(); it3.hasNext();) {
                        pointcut.addAdvice((String)it3.next());
                    }
                    // add advices from advice stacks
                    List adviceStackRefs = bindAdviceRule.getAdviceStackRefs();
                    for (Iterator it3 = adviceStackRefs.iterator(); it3.hasNext();) {
                        AdviceStackDefinition adviceStackDefinition =
View Full Code Here

                        AdviceStackDefinition adviceStackDefinition =
                                definition.getAdviceStackDefinition((String)it3.next());

                        List advices = adviceStackDefinition.getAdviceRefs();
                        for (Iterator it4 = advices.iterator(); it4.hasNext();) {
                            pointcut.addAdvice((String)it4.next());
                        }
                    }
                    // add the method pointcut
                    aspect.addExecutionPointcut(pointcut);
                }
View Full Code Here

                );
                if (pointcut == null) {
                    pointcut = new ExecutionPointcut(uuid, adviceDef.getExpression());
                    aspectMetaData.addExecutionPointcut(pointcut);
                }
                pointcut.addAdvice(adviceDef.getName());

                // TODO: how to handle cflow?
//                    methodPointcut.setCFlowExpression(adviceDef.getExpression().getCFlowExpression());
            }
        }
View Full Code Here

        ExecutionPointcut methodPointcut = (ExecutionPointcut)SystemLoader.getSystem("tests").
                getAspectMetaData(ASPECT_NAME).
                getExecutionPointcuts(m_classMetaData, methodMetaData).get(0);

        methodPointcut.addAdvice("advice2");

        m_logString = "";
        addAdviceTestMethod();
        assertEquals("before1 before2 invocation after2 after1 ", m_logString);
View Full Code Here

                    getAspectMetaData(ASPECT_NAME).
                    getExecutionPointcuts(m_classMetaData, methodMetaData).
                    get(0);

            // add the new advice to the pointcut
            methodPointcut.addAdvice("newAdvice");

            // check that it is executed
            m_logString = "";
            createAspectTestMethod();
            assertEquals("before2 beforeNew invocation afterNew after2 ", m_logString);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.