<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>Chapter 9. An Annotation Based Development Style</title><link rel="stylesheet" href="aspectj-docs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.44"><link rel="home" href="index.html" title="The AspectJTM 5 Development Kit Developer's Notebook"><link rel="up" href="index.html" title="The AspectJTM 5 Development Kit Developer's Notebook"><link rel="previous" href="pertypewithin.html" title="Chapter 8. The pertypewithin Aspect Instantiation Model"><link rel="next" href="ataspectj-aspects.html" title="Aspect Declarations"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. An Annotation Based Development Style</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pertypewithin.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ataspectj-aspects.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="ataspectj"></a>Chapter 9. An Annotation Based Development Style</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="ataspectj.html#ataspectj-intro">Introduction</a></dt><dt><a href="ataspectj-aspects.html">Aspect Declarations</a></dt><dd><dl><dt><a href="ataspectj-aspects.html#limitations">Limitations</a></dt></dl></dd><dt><a href="ataspectj-pcadvice.html">Pointcuts and Advice</a></dt><dd><dl><dt><a href="ataspectj-pcadvice.html#pointcuts">Pointcuts</a></dt><dt><a href="ataspectj-pcadvice.html#advice">Advice</a></dt></dl></dd><dt><a href="ataspectj-itds.html">Inter-type Declarations</a></dt><dt><a href="ataspectj-declare.html">Declare statements</a></dt><dt><a href="ataspectj-aspectof.html">aspectOf() and hasAspect() methods</a></dt></dl></div><div class="sect1"><a name="ataspectj-intro"></a><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="ataspectj-intro"></a>Introduction</h2></div></div><p>In addition to the familiar AspectJ code-based style of aspect | |
declaration, AspectJ 5 also supports an annotation-based style of | |
aspect declaration. We informally call the set of annotations that | |
support this development style the "@AspectJ" annotations.</p><p> | |
AspectJ 5 allows aspects and their members to be specified using | |
either the code style or the annotation style. Whichever style you | |
use, the AspectJ weaver ensures that your program has exactly the | |
same semantics. It is, to quote a famous advertising campaign, | |
"a choice, not a compromise". The two styles can be mixed within | |
a single application, and even within a single source file, though | |
we doubt this latter mix will be recommended in practice. | |
</p><p> | |
The use of the @AspectJ annotations means that there are large | |
classes of AspectJ applications that can be compiled by a regular | |
Java 5 compiler, and subsequently woven by the AspectJ weaver (for | |
example, as an additional build stage, or as late as class load-time). | |
In this chapter we introduce the @AspectJ annotations and show how | |
they can be used to declare aspects and aspect members. | |
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pertypewithin.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="ataspectj-aspects.html">Next</a></td></tr><tr><td width="40%" align="left">Chapter 8. The pertypewithin Aspect Instantiation Model </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Aspect Declarations</td></tr></table></div></body></html> |