aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/pr239649/Eleven.java
blob: fc771f4af2d31c8e46e7cef640291d8210593bcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public class Eleven {
  public static void main(String[] argv) {
    Eleven a = new Eleven();
    a.m();
  }

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

aspect X perthis(this(Eleven)) {

  boolean doit() {
    System.out.println("In instance check method doit()");
    return true;
  }

  before():execution(* m(..))  && if(thisAspectInstance.doit()){ 
    System.out.println("In advice()");
  }
}