1 8 package test.callAndExecution; 9 10 import org.codehaus.aspectwerkz.definition.Pointcut; 11 import org.codehaus.aspectwerkz.joinpoint.JoinPoint; 12 13 16 public class TestAspect { 17 19 23 Pointcut call1; 24 25 29 Pointcut call2; 30 31 35 Pointcut callIntf; 36 37 41 Pointcut callAbstract; 42 43 46 Pointcut execution1; 47 48 51 Pointcut execution2; 52 53 56 Pointcut executionIntf; 57 58 61 Pointcut executionAbstract; 62 63 65 68 public Object advice1(final JoinPoint joinPoint) throws Throwable { 69 CallExecutionTest.log("call1 "); 70 Object result = joinPoint.proceed(); 71 CallExecutionTest.log("call2 "); 72 return result; 73 } 74 75 78 public Object advice2(final JoinPoint joinPoint) throws Throwable { 79 CallExecutionTest.log("execution1 "); 80 Object result = joinPoint.proceed(); 81 CallExecutionTest.log("execution2 "); 82 return result; 83 } 84 } | Popular Tags |