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 546B

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