[jboss-cvs] JBossAS SVN: r62309 - projects/aop/trunk/aop/docs/examples/aspect.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 12 16:07:02 EDT 2007
Author: flavia.rainone at jboss.com
Date: 2007-04-12 16:07:01 -0400 (Thu, 12 Apr 2007)
New Revision: 62309
Modified:
projects/aop/trunk/aop/docs/examples/aspect/aspect.html
projects/aop/trunk/aop/docs/examples/aspect/aspect.wiki
Log:
[JBAOP-44] Updated Aspect example to Aspect and Around Advices example.
Modified: projects/aop/trunk/aop/docs/examples/aspect/aspect.html
===================================================================
--- projects/aop/trunk/aop/docs/examples/aspect/aspect.html 2007-04-12 18:40:38 UTC (rev 62308)
+++ projects/aop/trunk/aop/docs/examples/aspect/aspect.html 2007-04-12 20:07:01 UTC (rev 62309)
@@ -1,16 +1,18 @@
<html>
<body>
<p>
-<h2>Aspects</h2>
+<h2>Aspects and Around Advices</h2>
</p><p>
<h4>Overview</h4>
-The Interceptor classes shown in previous examples are a little limiting in that you can only have one advice per class. JBossAOP allows you to group advices into one Java class. This is what JBossAOP calls an Aspect. An Aspect is a collection of advices expressed as methods.
+The Interceptor classes shown in previous examples are a little limiting in that you can only have one advice per class. JBossAOP allows you to group advices into one Java class. This is what JBossAOP calls an Aspect. An Aspect is a collection of advices expressed as methods.
</p><p>
<h4>Writing an aspect</h4>
-An aspect class is a plain Java class. It does not have to inherit from anything, but it must have an empty constructor. Each advice must follow this format:
+An aspect class is a plain Java class. It does not have to inherit from anything, but it must have an empty constructor.
+JBoss AOP supports several types of advices. In this example, we will introduce the around advice and its default signature.
+Each around advice can follow this format:
</p><p>
<pre>
public Object <any-method-name>(<any Invocation type>) Throwable
Modified: projects/aop/trunk/aop/docs/examples/aspect/aspect.wiki
===================================================================
--- projects/aop/trunk/aop/docs/examples/aspect/aspect.wiki 2007-04-12 18:40:38 UTC (rev 62308)
+++ projects/aop/trunk/aop/docs/examples/aspect/aspect.wiki 2007-04-12 20:07:01 UTC (rev 62309)
@@ -1,10 +1,12 @@
-!!!Aspects
+!!!Aspects and Around Advices
!Overview
-The Interceptor classes shown in previous examples are a little limiting in that you can only have one advice per class. JBossAOP allows you to group advices into one Java class. This is what JBossAOP calls an Aspect. An Aspect is a collection of advices expressed as methods.
+The Interceptor classes shown in previous examples are a little limiting in that you can only have one advice per class. JBossAOP allows you to group advices into one Java class. This is what JBossAOP calls an Aspect. An Aspect is a collection of advices expressed as methods.
!Writing an aspect
-An aspect class is a plain Java class. It does not have to inherit from anything, but it must have an empty constructor. Each advice must follow this format:
+An aspect class is a plain Java class. It does not have to inherit from anything, but it must have an empty constructor.
+JBoss AOP supports several types of advices. In this example, we will introduce the around advice and its default signature.
+Each around advice can follow this format:
{{{
public Object <any-method-name>(<any Invocation type>) Throwable
More information about the jboss-cvs-commits
mailing list