From 05dabd1821fffd9f353d1e965a56658b962c82d7 Mon Sep 17 00:00:00 2001 From: acolyer Date: Tue, 10 Aug 2004 13:22:08 +0000 Subject: fix for Bugzilla Bug 53981 proceed used as method name in around advice --- docs/progGuideDB/semantics.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'docs/progGuideDB') diff --git a/docs/progGuideDB/semantics.xml b/docs/progGuideDB/semantics.xml index b88e86c7e..ba16b849c 100644 --- a/docs/progGuideDB/semantics.xml +++ b/docs/progGuideDB/semantics.xml @@ -1560,6 +1560,32 @@ } + + Any occurence of proceed(..) within the body of + around advice is treated as the special proceed form (even if the + aspect defines a method named proceed) unless a + target other than the aspect instance is specified as the recipient of + the call. + For example, in the following program the first + call to proceed will be treated as a method call to + the ICanProceed instance, whereas the second call to + proceed is treated as the special proceed form. + + + + aspect A { + Object around(ICanProceed canProceed) : execution(* *(..)) this(canProceed) { + canProceed.proceed(); // a method call + return proceed(canProceed); // the special proceed form + } + + private Object proceed(ICanProceed canProceed) { + // this method cannot be called from inside the body of around advice in + // the aspect + } + } + + In all kinds of advice, the parameters of the advice behave exactly like method parameters. In particular, assigning to any parameter affects -- cgit v1.2.3