Package org.codehaus.aspectwerkz.advice

Examples of org.codehaus.aspectwerkz.advice.Advice


     *
     * @param index the index of the advice
     * @return the advice
     */
    public Advice getAdvice(final int index) {
        Advice advice;
        try {
            advice = m_advices[index - 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[m_adviceIndexes.get(name) - 1];
        }
        catch (Throwable e1) {
            initialize();
View Full Code Here

     *
     * @param index the index of the advice
     * @return the advice
     */
    public Advice getAdvice(final int index) {
        Advice advice;
        try {
            advice = m_advices[index - 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[m_adviceIndexes.get(name) - 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

        }
        fail();
    }

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

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

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

TOP

Related Classes of org.codehaus.aspectwerkz.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.