summaryrefslogtreecommitdiffstats
path: root/docs/progGuideDB
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-08-10 13:22:08 +0000
committeracolyer <acolyer>2004-08-10 13:22:08 +0000
commit05dabd1821fffd9f353d1e965a56658b962c82d7 (patch)
treeac21652c7b86d12a0deaf3f287e97b6f5d07f16b /docs/progGuideDB
parentb3f5f6fe945ef35f8a3b97ec71bb5cc57e89a641 (diff)
downloadaspectj-05dabd1821fffd9f353d1e965a56658b962c82d7.tar.gz
aspectj-05dabd1821fffd9f353d1e965a56658b962c82d7.zip
fix for Bugzilla Bug 53981
proceed used as method name in around advice
Diffstat (limited to 'docs/progGuideDB')
-rw-r--r--docs/progGuideDB/semantics.xml26
1 files changed, 26 insertions, 0 deletions
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 @@
}
</programlisting>
+ <para>
+ Any occurence of <literal>proceed(..)</literal> within the body of
+ around advice is treated as the special proceed form (even if the
+ aspect defines a method named <literal>proceed</literal>) 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 <literal>ICanProceed</literal> instance, whereas the second call to
+ proceed is treated as the special proceed form.
+ </para>
+
+<programlisting>
+ aspect A {
+ Object around(ICanProceed canProceed) : execution(* *(..)) <![CDATA[&&]]> 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
+ }
+ }
+</programlisting>
+
<para>
In all kinds of advice, the parameters of the advice behave exactly like
method parameters. In particular, assigning to any parameter affects