diff options
author | aclement <aclement> | 2006-06-23 12:22:54 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-06-23 12:22:54 +0000 |
commit | 718543f8d7bdeec644aaee560066abd4a623578c (patch) | |
tree | 93d4d6fff91d808048768fc09326b36ce5cfbdcc /tests/features151/ataround/X42.java | |
parent | ffa7ca77ced7b9f874abb8603065452ddf195c1f (diff) | |
download | aspectj-718543f8d7bdeec644aaee560066abd4a623578c.tar.gz aspectj-718543f8d7bdeec644aaee560066abd4a623578c.zip |
126167: Fix for @Around problems...
Diffstat (limited to 'tests/features151/ataround/X42.java')
-rw-r--r-- | tests/features151/ataround/X42.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/features151/ataround/X42.java b/tests/features151/ataround/X42.java new file mode 100644 index 000000000..45da120e2 --- /dev/null +++ b/tests/features151/ataround/X42.java @@ -0,0 +1,30 @@ +// Bind the target and pass in the right order + +aspect X42 { + M newM = new M("2"); + + void around(M t,String p): call(void M.method(String)) && args(p) && target(t) { + System.err.println("advice from code aspect"); + proceed( newM , "faked" ); + } + + public static void main(String []argv) { + M.main(argv); + } +} + + + +class M { + + String prefix; + + public M(String prefix) { this.prefix = prefix; } + + public static void main( String[] args ) { + M m = new M("1"); + m.method("real"); + } + + public void method(String s) { System.err.println(prefix+s); } +} |