blob: 1237b28cd7316984a8ddf69682997629493c97dd (
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
34
35
36
37
38
39
40
41
42
|
import org.aspectj.lang.annotation.*;
public class PointcutAssortment {
@Pointcut("execution(* PointcutAssortment.*(..))")
void pc1() {}
@Pointcut("call(* PointcutAssortment.*(..))")
String pc2() {}
@Pointcut("foo()")
void pc3() {}
@Pointcut("pc1() || pc2()")
void pc4() {
System.out.println("hi there!");
}
@Pointcut("this(Integer)")
void pc5() {}
@Pointcut("this(i)")
void pc6(Integer i) {}
@Pointcut("OtherClass.intSet() && pc6(myInt)")
void pc7(Integer myInt) {}
@Pointcut("get(* *)")
@Pointcut("set(* *)")
void pc8() {}
@Pointcut("target(foo)")
void pc9() {}
}
class OtherClass {
@Pointcut("set(Integer *)")
void intSet() {};
}
|