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