aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/pr239649/Eight.java
blob: 5103f72a793ff5190a40addb5af55f4f4ae26d3e (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
26
27
public class Eight {
  public static void main(String[] argv) {
    Eight a = new Eight();
    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()");
  }
}

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

  boolean doit() {
    System.out.println("in doit(): class="+this.getClass().getName());
    return true;
  }

}