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.

FindShowError.java 576B

1234567891011121314151617181920212223242526
  1. import org.aspectj.compiler.base.ast.*;
  2. aspect Wins {
  3. pointcut showError(ASTObject ast, String msg):
  4. within(org.aspectj..*) && target(ast) && args(msg) && call(void showError(String));
  5. void around(ASTObject ast, String msg): showError(ast, msg) {
  6. System.out.println("hi");
  7. proceed(ast, msg);
  8. }
  9. }
  10. aspect Loses {
  11. pointcut showError(ASTObject ast, String msg):
  12. target(ast) && args(msg) && call(void showError(String));
  13. void around(ASTObject ast, String msg): showError(ast, msg) {
  14. System.out.println("hi");
  15. proceed(ast, msg);
  16. }
  17. }