blob: 072e133e22916256a03ff75c8e827949e1d9f254 (
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
|
public aspect SomeAspect {
void around(final SomeAnnotation someAnnotation) :
call(@SomeAnnotation void *.*(..)) && @annotation(someAnnotation) {
System.out.println("@someAspect annotation parameter (call)");
//CASES 1, 3 only
proceed(someAnnotation);
}
void around(final SomeAnnotation someAnnotation) :
execution(@SomeAnnotation void *.*(..)) &&
@annotation(someAnnotation) {
System.out.println("@someAspect annotation parameter (execution)"); //CASES 1, 2, 3
proceed(someAnnotation);
}
void around() : call(@SomeAnnotation void *.*(..)) {
System.out.println("@someAspect annotation no parameter");
//CASES 1, 2, 3
proceed();
}
void around() : call(void *.test*(..)) {
System.out.println("@someAspect method name"); //CASES 1, 2, 3
proceed();
}
}
|