1 8 package examples.annotation; 9 10 import org.codehaus.aspectwerkz.joinpoint.JoinPoint; 11 12 15 public class Target { 16 17 public static void main(String args[]) throws Throwable { 18 System.out.println("examples.annotation.Target.main"); 19 Target me = new Target(); 20 me.targetAB(); 21 me.targetA(); 22 me.target(); 23 } 24 25 29 public void targetAB() { 30 System.out.println("Target.target AB "); 31 } 32 33 36 public void targetA() { 37 System.out.println("Target.target A"); 38 } 39 40 public void target() { 41 System.out.println("Target.target"); 42 } 43 44 public static class AnnotationMatchAspect { 45 46 50 public void beforeA(JoinPoint jp) { 51 System.out.println("Target$AnnotationMatchAspect.beforeA : " + jp.toString() ); 52 53 } 54 55 59 public void beforeB(JoinPoint jp) { 60 System.out.println("Target$AnnotationMatchAspect.beforeB"); 61 62 63 } 64 } 65 66 } 67 | Popular Tags |