Package org.codehaus.aspectwerkz.xmldef.advice

Examples of org.codehaus.aspectwerkz.xmldef.advice.Advice


        }
        fail();
    }

    public void testRegisterAdvice() {
        Advice advice = new PreAdvice() {
            public void execute(final JoinPoint joinPoint) {
            }
        };
        ((XmlDefSystem)SystemLoader.getSystem("tests")).register("testRegisterAdvice", advice);
        assertNotNull(((XmlDefSystem)SystemLoader.getSystem("tests")).getAdvice("testRegisterAdvice"));
View Full Code Here


        ((XmlDefSystem)SystemLoader.getSystem("tests")).register("testRegisterAdvice", advice);
        assertNotNull(((XmlDefSystem)SystemLoader.getSystem("tests")).getAdvice("testRegisterAdvice"));
    }

    public void testFindAdviceByIndex() {
        Advice advice = new PreAdvice() {
            public void execute(final JoinPoint joinPoint) {
            }
        };
        ((XmlDefSystem)SystemLoader.getSystem("tests")).register("testFindAdviceByIndex", advice);
        IndexTuple index = SystemLoader.getSystem("tests").getAdviceIndexFor("testFindAdviceByIndex");
View Full Code Here

     *
     * @param index the index of the advice
     * @return the advice
     */
    public Advice getAdvice(final IndexTuple index) {
        Advice advice;
        try {
            advice = m_advices[index.getAspectIndex() - 1];
        }
        catch (Throwable e) {
            initialize();
View Full Code Here

     *
     * @param name the name of the advice
     * @return the the advice
     */
    public Advice getAdvice(final String name) {
        Advice advice;
        try {
            advice = m_advices[((IndexTuple)m_adviceIndexes.get(name)).getAspectIndex() - 1];
        }
        catch (Throwable e1) {
            initialize();
View Full Code Here

    public int clearAllRedundancies(final MethodJoinPoint jp) {
        Iterator it = getAllAdvices(jp, true);

        int iRedundancies = 0;
        while (it.hasNext()) {
            Advice advice = (Advice)it.next();
            iRedundancies += clearRedundancy(jp, advice.getName(), false);
        }

        // Now that advices have been removed, purge the pointcuts
        purgePointcuts(jp);
View Full Code Here

     *
     * @param index the index of the advice
     * @return the advice
     */
    public Advice getAdvice(final IndexTuple index) {
        Advice advice;
        try {
            advice = m_advices[index.getAspectIndex() - 1];
        }
        catch (Throwable e) {
            initialize();
View Full Code Here

     *
     * @param name the name of the advice
     * @return the the advice
     */
    public Advice getAdvice(final String name) {
        Advice advice;
        try {
            advice = m_advices[((IndexTuple)m_adviceIndexes.get(name)).getAspectIndex() - 1];
        }
        catch (Throwable e1) {
            initialize();
View Full Code Here

        }
        fail();
    }

    public void testRegisterAdvice() {
        Advice advice = new PreAdvice() {
            public void execute(final JoinPoint joinPoint) {
            }
        };
        ((XmlDefSystem)SystemLoader.getSystem("tests")).register("testRegisterAdvice", advice);
        assertNotNull(((XmlDefSystem)SystemLoader.getSystem("tests")).getAdvice("testRegisterAdvice"));
View Full Code Here

        ((XmlDefSystem)SystemLoader.getSystem("tests")).register("testRegisterAdvice", advice);
        assertNotNull(((XmlDefSystem)SystemLoader.getSystem("tests")).getAdvice("testRegisterAdvice"));
    }

    public void testFindAdviceByIndex() {
        Advice advice = new PreAdvice() {
            public void execute(final JoinPoint joinPoint) {
            }
        };
        ((XmlDefSystem)SystemLoader.getSystem("tests")).register("testFindAdviceByIndex", advice);
        IndexTuple index = SystemLoader.getSystem("tests").getAdviceIndexFor("testFindAdviceByIndex");
View Full Code Here

    public int clearAllRedundancies(final MethodJoinPoint jp) {
        Iterator it = getAllAdvices(jp, true);

        int iRedundancies = 0;
        while (it.hasNext()) {
            Advice advice = (Advice)it.next();
            iRedundancies += clearRedundancy(jp, advice.getName(), false);
        }

        // Now that advices have been removed, purge the pointcuts
        purgePointcuts(jp);
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.xmldef.advice.Advice

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.