Package org.codehaus.aspectwerkz.joinpoint

Examples of org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint


    public MyMemberMethodAdvice6() {
        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((Loggable)jp.getTargetObject()).log(getParameter("test"));
        return joinPoint.proceed();
    }
View Full Code Here


    public MyMemberMethodAdvice2() {
        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((Loggable)jp.getTargetObject()).log("before1 ");
        final Object result = joinPoint.proceed();
        ((Loggable)jp.getTargetObject()).log("after1 ");
        return result;
    }
View Full Code Here

    public MyStaticMethodAdvice5() {
        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((StaticMethodAdviceTest)jp.getTargetObject()).log("before ");
        final Object result = joinPoint.proceedInNewThread();
        ((StaticMethodAdviceTest)jp.getTargetObject()).log("after ");
        return result;
    }
View Full Code Here

public class DynamicallyCreatedTransientAdvice extends AroundAdvice {
    public DynamicallyCreatedTransientAdvice() {
        super();
    }
    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((Loggable)jp.getTargetObject()).log("before ");
        final Object result = joinPoint.proceed();
        ((Loggable)jp.getTargetObject()).log("after ");
        return result;
    }
View Full Code Here

    public MyStaticMethodAdvice3() {
        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((StaticMethodAdviceTest)jp.getTargetObject()).log("before2 ");
        final Object result = joinPoint.proceed();
        ((StaticMethodAdviceTest)jp.getTargetObject()).log("after2 ");
        return result;
    }
View Full Code Here

        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
//        System.out.println("param to advice = " + getParameter("param"));
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        indent();
        System.out.println("--> " + jp.getTargetClass().getName() + "::" + jp.getMethodName());
        m_level++;
        final Object result = joinPoint.proceed();
        m_level--;
        indent();
        System.out.println("<-- " + jp.getTargetClass().getName() + "::" + jp.getMethodName());
        return result;
    }
View Full Code Here

     * @Around methodsToLog1
     * @Around methodsToLog2
     * @Around methodsToLog3
     */
    public Object logMethod(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        indent();
        System.out.println("--> " + jp.getTargetClass().getName() + "::" + jp.getMethodName());
        m_level++;
        final Object result = joinPoint.proceed();
        m_level--;
        indent();
        System.out.println("<-- " + jp.getTargetClass().getName() + "::" + jp.getMethodName());
        return result;
    }
View Full Code Here

    public MyStaticMethodAdvice3() {
        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((StaticMethodAdviceTest)jp.getTargetInstance()).log("before2 ");
        final Object result = joinPoint.proceed();
        ((StaticMethodAdviceTest)jp.getTargetInstance()).log("after2 ");
        return result;
    }
View Full Code Here

    public MyStaticMethodAdvice2() {
        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((StaticMethodAdviceTest)jp.getTargetInstance()).log("before1 ");
        final Object result = joinPoint.proceed();
        ((StaticMethodAdviceTest)jp.getTargetInstance()).log("after1 ");
        return result;
    }
View Full Code Here

    public MyMemberMethodAdvice5() {
        super();
    }

    public Object execute(final JoinPoint joinPoint) throws Throwable {
        MethodJoinPoint jp = (MethodJoinPoint)joinPoint;
        ((Loggable)jp.getTargetInstance()).log("before ");
        final Object result = joinPoint.proceedInNewThread();
        ((Loggable)jp.getTargetInstance()).log("after ");
        return result;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint

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.