Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

AnnotationPlusPatternMatchingError.aj 561B

123456789101112131415161718192021222324252627282930313233
  1. interface A {
  2. public void a(String s);
  3. }
  4. @Annotation
  5. interface B extends A{}
  6. class C implements B {
  7. public void a(final String s) {}
  8. }
  9. aspect Aspect{
  10. pointcut foo(): call(* (@Annotation *)+.*(..));
  11. declare warning : foo() : "matched";
  12. before() : foo() {
  13. System.out.println("In advice");
  14. }
  15. }
  16. public class AnnotationPlusPatternMatchingError {
  17. public static void main(String[] args) {
  18. new AnnotationPlusPatternMatchingError().testLtw();
  19. }
  20. public void testLtw() {
  21. B anA = new C();
  22. anA.a("hi");
  23. }
  24. }
  25. @interface Annotation {}