diff options
author | aclement <aclement> | 2007-11-12 22:19:59 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-11-12 22:19:59 +0000 |
commit | bd00110f8f65f2d3dfcbb40cf49835a8cb279897 (patch) | |
tree | 9f5d540cef1983cd92152a8dc89284ef23dc3812 /tests/bugs154/pr194314/test/ServiceInterceptor.java | |
parent | 40f443c339a500f052e68344c3ade40e8dd7ca14 (diff) | |
download | aspectj-bd00110f8f65f2d3dfcbb40cf49835a8cb279897.tar.gz aspectj-bd00110f8f65f2d3dfcbb40cf49835a8cb279897.zip |
pr194314: broken LV table, testcode
Diffstat (limited to 'tests/bugs154/pr194314/test/ServiceInterceptor.java')
-rwxr-xr-x | tests/bugs154/pr194314/test/ServiceInterceptor.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs154/pr194314/test/ServiceInterceptor.java b/tests/bugs154/pr194314/test/ServiceInterceptor.java new file mode 100755 index 000000000..491fa5027 --- /dev/null +++ b/tests/bugs154/pr194314/test/ServiceInterceptor.java @@ -0,0 +1,26 @@ +package test;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+ @Aspect public class ServiceInterceptor {
+//public aspect ServiceInterceptor {
+
+// void around(): execution(void test.Service.method(long)) {
+// Object[] args = thisJoinPoint.getArgs();
+// long id = (Long) args[0];
+// System.out.println("in advice, arg = " + id + " (before proceed)");
+// proceed();
+// System.out.println("in advice (after proceed)");
+// }
+
+ @Around("execution(void test.Service.method(long))")
+ public void method(ProceedingJoinPoint pjp) throws Throwable {
+ Object[] args = pjp.getArgs();
+ long id = (Long) args[0];
+ System.out.println("in advice, arg = " + id + " (before proceed)");
+ pjp.proceed(pjp.getArgs());
+ System.out.println("in advice (after proceed)");
+ }
+}
|