summaryrefslogtreecommitdiffstats
path: root/tests/features164/declareMixin/CaseN.java
blob: 54b5f34dde2714bacad78aee9b14b9dabe235920 (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
// TESTING: factory returns class but interface specified - this is OK
import org.aspectj.lang.annotation.*;

public class CaseN {
  public static void main(String[]argv) { 
    ((I)new CaseN()).foo();
  }
}

aspect X {
  @DeclareMixin(value="CaseN",interfaces={I.class})
  public static C createImplementation1() {return new C();}

}

interface I {
  void foo();
}

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