blob: 604582293563e3a7239a1e5387447b83ab5c6f54 (
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
|
import org.aspectj.testing.Tester;
public class MethodInner {
public static void main(String[] args) { test(); }
public static void test() {
Tester.checkEqual(new C().foo(), 10, "inner");
}
}
class C {
int foo() {
final int N = 10;
class Inner {
public int bar() {
return N;
}
}
return new Inner().bar();
}
}
aspect A issingleton() {
before(): execution(int *(..)) {
System.out.println("before: " + thisJoinPoint);
}
}
|