aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features164/declareMixin/CaseR.java
blob: 854037962c8006e6a44b90bbfdeb51e17056e225 (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
// TESTING: testing a pure marker interface - no methods added
import org.aspectj.lang.annotation.*;

public class CaseR {
  public static void main(String[]argv) { 
	  CaseR cr = new CaseR();
	  System.out.println(cr instanceof I);
	  System.out.println(cr instanceof J);
  }
}

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

interface I {}
interface J {}

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