blob: fa97b47c66478548c6c67c6c8502405edfde5e1a (
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
43
44
45
46
47
48
49
50
51
52
53
|
public class Code {
public static void main(String[] args) {
A.methodA();
}
}
class A {
public static void methodA() {
B.methodB();
}
}
class B {
public static void methodB() {
C.methodC();
int a = 1;
int b = 2;
System.out.println( a + b );
}
}
class C {
public static void methodC() {
D.methodD();
}
}
class D {
public static void methodD() {
}
}
aspect CFlow {
public pointcut flow() : cflow(call( * B.methodB() ) ) && !within(CFlow);
before() : flow() {
System.out.println( thisJoinPoint );
}
}
|