diff options
author | ehilsdal <ehilsdal> | 2004-08-23 01:53:41 +0000 |
---|---|---|
committer | ehilsdal <ehilsdal> | 2004-08-23 01:53:41 +0000 |
commit | acaeeaf485dd45db241b10c594d1a7a99bd7afa1 (patch) | |
tree | 4d3d6f604351fbddaed92ec62330d48579936848 /docs/progGuideDB | |
parent | a7d57dab76b3a8dda616ea0e1e0f0afc1504bf60 (diff) | |
download | aspectj-acaeeaf485dd45db241b10c594d1a7a99bd7afa1.tar.gz aspectj-acaeeaf485dd45db241b10c594d1a7a99bd7afa1.zip |
fix for bugzilla bug 72379:
static aspects not well explained
Diffstat (limited to 'docs/progGuideDB')
-rw-r--r-- | docs/progGuideDB/gettingstarted.xml | 4 | ||||
-rw-r--r-- | docs/progGuideDB/semantics.xml | 61 |
2 files changed, 48 insertions, 17 deletions
diff --git a/docs/progGuideDB/gettingstarted.xml b/docs/progGuideDB/gettingstarted.xml index 0701d01bd..c9ac6ad36 100644 --- a/docs/progGuideDB/gettingstarted.xml +++ b/docs/progGuideDB/gettingstarted.xml @@ -888,7 +888,7 @@ aspect PointBoundsChecking { </para> <programlisting><![CDATA[ -static aspect RegistrationProtection { +aspect RegistrationProtection { pointcut register(): call(void Registry.register(FigureElement)); @@ -920,7 +920,7 @@ static aspect RegistrationProtection { </para> <programlisting><![CDATA[ -static aspect RegistrationProtection { +aspect RegistrationProtection { pointcut register(): call(void Registry.register(FigureElement)); pointcut canRegister(): withincode(static * FigureElement.make*(..)); diff --git a/docs/progGuideDB/semantics.xml b/docs/progGuideDB/semantics.xml index 260efa221..b7dd33445 100644 --- a/docs/progGuideDB/semantics.xml +++ b/docs/progGuideDB/semantics.xml @@ -2620,23 +2620,54 @@ ModifiersPattern = <para> An aspect is a crosscutting type defined by the <literal>aspect</literal> - declaration. The <literal>aspect</literal> declaration is similar to the - <literal>class</literal> declaration in that it defines a type and an - implementation for that type. It differs in that the type and - implementation can cut across other types (including those defined by - other aspect declarations), and that it may not be directly instantiated - with a new expression, with cloning, or with serialization. Aspects may - have one constructor definition, but if so it must be of a constructor - taking no arguments and throwing no checked exceptions. + declaration. </para> - <para> - Aspects may be defined either at the package level, or as a static nested - aspect -- that is, a static member of a class, interface, or aspect. If it - is not at the package level, the aspect <emphasis>must</emphasis> be - defined with the static keyword. Local and anonymous aspects are not - allowed. - </para> + <sect2> + <title>Aspect Declaration</title> + + <para> + The <literal>aspect</literal> declaration is similar to the + <literal>class</literal> declaration in that it defines a type and an + implementation for that type. It differs in a number of + ways: + </para> + + <sect3> + <title>Aspect implementation can cut across other types</title> + + <para> In addition to normal Java class declarations such as + methods and fields, aspect declarations can include AspectJ + declarations such as advice, pointcuts, and inter-type + declarations. Thus, aspects contain implementation + declarations that can can cut across other types (including those defined by + other aspect declarations). + </para> + </sect3> + + <sect3> + <title>Aspects are not directly instantiated</title> + + <para> Aspects are not directly instantiated with a new + expression, with cloning, or with serialization. Aspects may + have one constructor definition, but if so it must be of a + constructor taking no arguments and throwing no checked + exceptions. + </para> + </sect3> + + <sect3> + <title>Nested aspects must be <literal>static</literal></title> + + <para> + Aspects may be defined either at the package level, or as a static nested + aspect -- that is, a static member of a class, interface, or aspect. If it + is not at the package level, the aspect <emphasis>must</emphasis> be + defined with the static keyword. Local and anonymous aspects are not + allowed. + </para> + </sect3> + </sect2> <sect2> <title>Aspect Extension</title> |