aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features164/declareMixin/CaseA.java
blob: ac4933437c64035f919085839be4333d81308e26 (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
import org.aspectj.lang.annotation.*;

public class CaseA {
  public static void main(String[]argv) {
    CaseA ca = new CaseA();
    ((I)ca).methodOne();
  }
}

aspect X {
  @DeclareMixin("CaseA")
  public I createImplementation() {
    return new Implementation();
  }
}

interface I {
  void methodOne();
}

class Implementation implements I {
  public void methodOne() {
    System.out.println("methodOne running");
  }
}