[jboss-cvs] JBossAS SVN: r79727 - projects/aop/trunk/aop/docs/reference/reference/en/modules.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Oct 20 01:44:50 EDT 2008


Author: flavia.rainone at jboss.com
Date: 2008-10-20 01:44:50 -0400 (Mon, 20 Oct 2008)
New Revision: 79727

Modified:
   projects/aop/trunk/aop/docs/reference/reference/en/modules/advices.xml
Log:
[JBAOP-388] Updated advices chapter of reference manual to describe the new rules for @Thrown-annotated advice
parameters.

Modified: projects/aop/trunk/aop/docs/reference/reference/en/modules/advices.xml
===================================================================
--- projects/aop/trunk/aop/docs/reference/reference/en/modules/advices.xml	2008-10-20 05:43:10 UTC (rev 79726)
+++ projects/aop/trunk/aop/docs/reference/reference/en/modules/advices.xml	2008-10-20 05:44:50 UTC (rev 79727)
@@ -298,7 +298,12 @@
                <row>
                   <entry><literal>@Thrown</literal></entry>
                   <entry>Joinpoint thrown exception</entry>
-                  <entry><literal>Throwable</literal></entry>
+                  <entry align="left"><literal>java.lang.Throwable</literal>
+                         <para>If used on an after-throwing advice, this parameter can also be:</para>
+                         <para>- assignable from any exception declared to be thrown by the joinpoint</para>
+                         <para>- <literal>java.lang.RuntimeException</literal> or any subtype of this class</para>
+                  </entry>
+                  
                   <entry align="left">Yes:
                      <para>- for after-throwing advices</para>
                      <para>- for finally advices only if <literal>@Return</literal> is present</para>
@@ -335,7 +340,7 @@
                <row>
                   <entry><literal>@Args</literal></entry>
                   <entry>All joinpoint arguments</entry>
-                  <entry><literal>Object[]</literal></entry>
+                  <entry><literal>java.lang.Object[]</literal></entry>
                   <entry>No</entry>
                   <entry>Yes</entry>
                   <entry>Yes</entry>
@@ -376,7 +381,7 @@
          </para>
          <programlisting><![CDATA[public class Aspect
 {
-   public void throwing1(@Thrown Throwable thrownException)
+   public void throwing1(@Thrown RuntimeException thrownException)
    {
       ...
    }
@@ -470,7 +475,9 @@
    </bind>
 </aop>]]></programlisting>
          <para>
-            This example binds four finally advices to the execution of all public methods that return an int value.
+            This example binds four finally advices to the execution of all public methods that return an int value. Take note on the
+            type of the <literal>@Thrown</literal>-annotated parameters, which must be <literal>Throwable</literal> for this type of
+            advice.
          </para>
          <para>
             The presence of <literal>@Thrown</literal> is not mandatory in advices <literal>finally1()</literal>




More information about the jboss-cvs-commits mailing list