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.

TestEmptyPointcutAtAspect2.java 367B

12345678910111213141516171819202122232425262728
  1. import org.aspectj.lang.annotation.*;
  2. @Aspect
  3. public class TestEmptyPointcutAtAspect2 {
  4. @Pointcut("")
  5. protected void scope () {}
  6. @Before("within(*) && scope()")
  7. public void m() {
  8. System.err.println("Here!");
  9. }
  10. }
  11. class A {
  12. String s;
  13. int i;
  14. public static void main(String[] args) {
  15. new A().foo();
  16. }
  17. public void foo() {
  18. i=4;
  19. s="hello";
  20. }
  21. }