1 8 package test.staticfield; 9 10 import org.codehaus.aspectwerkz.definition.Pointcut; 11 import org.codehaus.aspectwerkz.joinpoint.JoinPoint; 12 13 17 public class TestAspect { 18 21 Pointcut pcSet; 22 23 26 Pointcut pcSetMember; 27 28 31 Pointcut pcSetColl; 32 33 36 Pointcut pcSetMemberColl; 37 38 41 Pointcut pcGetColl; 42 43 46 Pointcut pcGetMemberColl; 47 48 51 Pointcut filter; 52 53 56 public void preStaticField(final JoinPoint joinPoint) throws Throwable { 57 CollectionFieldTest.s_log += "MyPreAdvice1 "; 58 } 59 60 63 public void preMemberField1(final JoinPoint joinPoint) throws Throwable { 64 CollectionFieldTest.s_log += "MyPreAdvice2 "; 65 } 66 67 70 public void preStaticField2(final JoinPoint joinPoint) throws Throwable { 71 CollectionFieldTest.s_log += "MyPreAdvice1 "; 72 } 73 74 77 public void preMemberField2(final JoinPoint joinPoint) throws Throwable { 78 CollectionFieldTest.s_log += "MyPreAdvice2 "; 79 } 80 81 84 public void postStaticField(final JoinPoint joinPoint) throws Throwable { 85 CollectionFieldTest.s_log += "MyPostAdvice1 "; 86 } 87 88 91 public void postMemberField(final JoinPoint joinPoint) throws Throwable { 92 CollectionFieldTest.s_log += "MyPostAdvice2 "; 93 } 94 } | Popular Tags |