Examples of AfterReturningAdvice


Examples of com.gwtent.aop.client.advice.AfterReturningAdvice

    else if (method.getAnnotation(Before.class) != null)
      return new BeforeAdvice(method, aspect);
    else if (method.getAnnotation(After.class) != null)
      return new AfterAdvice(method, aspect);
    else if (method.getAnnotation(AfterReturning.class) != null)
      return new AfterReturningAdvice(method, aspect);
    else if (method.getAnnotation(AfterThrowing.class) != null)
      return new AfterThrowingAdvice(method, aspect);
    else return null;
  }
View Full Code Here

Examples of org.codehaus.aspectwerkz.intercept.AfterReturningAdvice

        adviseWithAfterReturning();
        assertEquals("adviseWithAfterReturning ", LOG);

        ((Advisable) this).aw$addAdvice(
                "* test.intercept.execution.InterceptTest.adviseWithAfterReturning(..)",
                new AfterReturningAdvice() {
                    public void invoke(JoinPoint jp, Object returnValue) throws Throwable {
                        InterceptTest.log("afterReturning ");
                        InterceptTest.log((String) returnValue);
                        InterceptTest.log(" ");
                    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.intercept.AfterReturningAdvice

        adviseWithAfterReturningPrimitive();
        assertEquals("adviseWithAfterReturningPrimitive ", LOG);

        ((Advisable) this).aw$addAdvice(
                "* test.intercept.execution.InterceptTest.adviseWithAfterReturningPrimitive(..)",
                new AfterReturningAdvice() {
                    public void invoke(JoinPoint jp, Object returnValue) throws Throwable {
                        InterceptTest.log("afterReturning ");
                        InterceptTest.log(((Integer) returnValue).toString());
                        InterceptTest.log(" ");
                    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.intercept.AfterReturningAdvice

        callee.adviseWithAfterReturning();
        assertEquals("adviseWithAfterReturning ", LOG);

        ((Advisable) callee).aw$addAdvice(
                "* test.intercept.call.Callee.adviseWithAfterReturning(..)",
                new AfterReturningAdvice() {
                    public void invoke(JoinPoint jp, Object returnValue) throws Throwable {
                        InterceptTest.log("afterReturning ");
                        InterceptTest.log((String) returnValue);
                        InterceptTest.log(" ");
                    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.intercept.AfterReturningAdvice

        adviseWithAfterReturning();
        assertEquals("adviseWithAfterReturning ", LOG);

        ((Advisable) this).aw_addAdvice(
                "execution(* test.intercept.execution.InterceptTest.adviseWithAfterReturning(..))",
                new AfterReturningAdvice() {
                    public void invoke(JoinPoint jp, Object returnValue) throws Throwable {
                        InterceptTest.log("afterReturning ");
                        InterceptTest.log((String) returnValue);
                        InterceptTest.log(" ");
                    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.intercept.AfterReturningAdvice

        adviseWithAfterReturningPrimitive();
        assertEquals("adviseWithAfterReturningPrimitive ", LOG);

        ((Advisable) this).aw_addAdvice(
                "execution(* test.intercept.execution.InterceptTest.adviseWithAfterReturningPrimitive(..))",
                new AfterReturningAdvice() {
                    public void invoke(JoinPoint jp, Object returnValue) throws Throwable {
                        InterceptTest.log("afterReturning ");
                        InterceptTest.log(((Integer) returnValue).toString());
                        InterceptTest.log(" ");
                    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.intercept.AfterReturningAdvice

        callee.adviseWithAfterReturning();
        assertEquals("adviseWithAfterReturning ", LOG);

        ((Advisable) this).aw_addAdvice(
                "call(* test.intercept.call.Callee.adviseWithAfterReturning(..))",
                new AfterReturningAdvice() {
                    public void invoke(JoinPoint jp, Object returnValue) throws Throwable {
                        InterceptTest.log("afterReturning ");
                        InterceptTest.log((String) returnValue);
                        InterceptTest.log(" ");
                    }
View Full Code Here

Examples of org.springframework.aop.AfterReturningAdvice

  public boolean supportsAdvice(Advice advice) {
    return (advice instanceof AfterReturningAdvice);
  }

  public MethodInterceptor getInterceptor(Advisor advisor) {
    AfterReturningAdvice advice = (AfterReturningAdvice) advisor.getAdvice();
    return new AfterReturningAdviceInterceptor(advice);
  }
View Full Code Here

Examples of org.springframework.aop.AfterReturningAdvice

  public boolean supportsAdvice(Advice advice) {
    return (advice instanceof AfterReturningAdvice);
  }

  public MethodInterceptor getInterceptor(Advisor advisor) {
    AfterReturningAdvice advice = (AfterReturningAdvice) advisor.getAdvice();
    return new AfterReturningAdviceInterceptor(advice);
  }
View Full Code Here

Examples of org.springframework.aop.AfterReturningAdvice

    advisor.setOrder(advisorOrder);
    return advisor;
  }

  private Advisor createSpringAOPAfterAdvice(int order) {
    AfterReturningAdvice advice = new AfterReturningAdvice() {
      public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
      }
    };
    DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(this.anyOldPointcut, advice);
    advisor.setOrder(order);
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.