aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/features164/declareMixin/CaseA.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/features164/declareMixin/CaseA.java b/tests/features164/declareMixin/CaseA.java
new file mode 100644
index 000000000..ac4933437
--- /dev/null
+++ b/tests/features164/declareMixin/CaseA.java
@@ -0,0 +1,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");
+ }
+}