blob: 200ce18ce8f91b69ec9629c3de4a98e643689b6a (
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
|
public class Init {
public static void main(String []argv) {
new A();
new B();
}
}
class A {}
class B {}
aspect X {
before(): preinitialization(A.new(..)) && !within(X) {
System.out.println(thisJoinPointStaticPart.getSignature());
}
before(): preinitialization(A.new(..)) && !within(X) {
System.out.println(thisEnclosingJoinPointStaticPart.getSignature());
}
before(): initialization(B.new(..)) && !within(X) {
System.out.println(thisJoinPointStaticPart.getSignature());
}
before(): initialization(B.new(..)) && !within(X) {
System.out.println(thisEnclosingJoinPointStaticPart.getSignature());
}
}
|