aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2009-03-03 19:13:40 +0000
committeraclement <aclement>2009-03-03 19:13:40 +0000
commiteeb997753292a003e269aeb272df261fd2a838cd (patch)
tree437f79d3637e75623f070f2edf7cfff291612f0c /tests
parent7239597b06d9afef587f1c01e2d44b701bc429cb (diff)
downloadaspectj-eeb997753292a003e269aeb272df261fd2a838cd.tar.gz
aspectj-eeb997753292a003e269aeb272df261fd2a838cd.zip
declareMixin
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");
+ }
+}