blob: f07efba6b43371116efcf6531cb52bb8e75d15fd (
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
|
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.reflect.SourceLocation;
public class NewSwitch {
public static void main(String[] args) {
new NewSwitch(2);
}
protected NewSwitch() {
this(3);
}
protected NewSwitch(int p) {
switch (p) {
case 3: break;
}
}
}
aspect FFDC {
pointcut initializers( ) : staticinitialization( * ) || initialization( *.new(..) );
pointcut methodsAndConstructors( ) : execution(* *(..)) || execution(new(..) );
pointcut guarded( ) : initializers( ) || methodsAndConstructors( );
final pointcut nonStaticContext( Object o ) : this( o );
after(Object o) throwing(Throwable t) : guarded( ) && nonStaticContext( o ) { }
}
|