You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NewSwitch.java 727B

12345678910111213141516171819202122232425262728293031
  1. import org.aspectj.lang.JoinPoint;
  2. import org.aspectj.lang.Signature;
  3. import org.aspectj.lang.reflect.SourceLocation;
  4. public class NewSwitch {
  5. public static void main(String[] args) {
  6. new NewSwitch(2);
  7. }
  8. protected NewSwitch() {
  9. this(3);
  10. }
  11. protected NewSwitch(int p) {
  12. switch (p) {
  13. case 3: break;
  14. }
  15. }
  16. }
  17. aspect FFDC {
  18. pointcut initializers( ) : staticinitialization( * ) || initialization( *.new(..) );
  19. pointcut methodsAndConstructors( ) : execution(* *(..)) || execution(new(..) );
  20. pointcut guarded( ) : initializers( ) || methodsAndConstructors( );
  21. final pointcut nonStaticContext( Object o ) : this( o );
  22. after(Object o) throwing(Throwable t) : guarded( ) && nonStaticContext( o ) { }
  23. }