aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features151/ataround/X42.java
diff options
context:
space:
mode:
authoraclement <aclement>2006-06-23 12:22:54 +0000
committeraclement <aclement>2006-06-23 12:22:54 +0000
commit718543f8d7bdeec644aaee560066abd4a623578c (patch)
tree93d4d6fff91d808048768fc09326b36ce5cfbdcc /tests/features151/ataround/X42.java
parentffa7ca77ced7b9f874abb8603065452ddf195c1f (diff)
downloadaspectj-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.java30
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); }
+}