aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/pr239649/Nine.java
blob: 05d4c88f08196e1f4a331d4918f88461d0a1ab83 (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
public class Nine {
  public static void main(String[] argv) {
    Nine a = new Nine();
    a.m();
  }

  public void m() {
    System.out.println("Method m() running");
  }
}

abstract aspect Y {
  abstract pointcut p();
  before(): execution(* m(..))  && p() {
    System.out.println("In advice()");
  }
  boolean doit() {
    System.out.println("in doit(): class="+this.getClass().getName());
    return true;
  }
}

aspect X extends Y {
  pointcut p(): if(thisAspectInstance.doit());
}