diff options
author | aclement <aclement> | 2009-03-03 19:13:40 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-03-03 19:13:40 +0000 |
commit | eeb997753292a003e269aeb272df261fd2a838cd (patch) | |
tree | 437f79d3637e75623f070f2edf7cfff291612f0c /tests/features164 | |
parent | 7239597b06d9afef587f1c01e2d44b701bc429cb (diff) | |
download | aspectj-eeb997753292a003e269aeb272df261fd2a838cd.tar.gz aspectj-eeb997753292a003e269aeb272df261fd2a838cd.zip |
declareMixin
Diffstat (limited to 'tests/features164')
-rw-r--r-- | tests/features164/declareMixin/CaseA.java | 25 |
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"); + } +} |