<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>Appendix B. Language Semantics</title><meta name="generator" content="DocBook XSL Stylesheets V1.44"><link rel="home" href="index.html" title="The AspectJTM Programming Guide"><link rel="up" href="index.html" title="The AspectJTM Programming Guide"><link rel="previous" href="quick-aspectAssociations.html" title="Aspects"><link rel="next" href="semantics-joinPoints.html" title="Join Points"></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">Appendix B. Language Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="quick-aspectAssociations.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="semantics-joinPoints.html">Next</a></td></tr></table><hr></div><div class="appendix"><div class="titlepage"><div><h2 class="title"><a name="semantics"></a>Appendix B. Language Semantics</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="semantics.html#semantics-intro">Introduction</a></dt><dt><a href="semantics-joinPoints.html">Join Points</a></dt><dt><a href="semantics-pointcuts.html">Pointcuts</a></dt><dd><dl><dt><a href="semantics-pointcuts.html#d0e5080">Pointcut definition</a></dt><dt><a href="semantics-pointcuts.html#d0e5122">Context exposure</a></dt><dt><a href="semantics-pointcuts.html#d0e5197">Primitive pointcuts</a></dt><dt><a href="semantics-pointcuts.html#d0e5541">Signatures</a></dt><dt><a href="semantics-pointcuts.html#d0e5589">Matching</a></dt><dt><a href="semantics-pointcuts.html#d0e5817">Type patterns</a></dt><dt><a href="semantics-pointcuts.html#d0e5966">Pattern Summary</a></dt></dl></dd><dt><a href="semantics-advice.html">Advice</a></dt><dd><dl><dt><a href="semantics-advice.html#d0e6148">Advice modifiers</a></dt><dt><a href="semantics-advice.html#d0e6156">Advice and checked exceptions</a></dt><dt><a href="semantics-advice.html#d0e6220">Advice precedence</a></dt><dt><a href="semantics-advice.html#d0e6297">Reflective access to the join point</a></dt></dl></dd><dt><a href="semantics-declare.html">Static crosscutting</a></dt><dd><dl><dt><a href="semantics-declare.html#d0e6358">Inter-type member declarations</a></dt><dt><a href="semantics-declare.html#d0e6526">Access modifiers</a></dt><dt><a href="semantics-declare.html#d0e6543">Conflicts</a></dt><dt><a href="semantics-declare.html#d0e6640">Extension and Implementation</a></dt><dt><a href="semantics-declare.html#d0e6683">Interfaces with members</a></dt><dt><a href="semantics-declare.html#d0e6727">Warnings and Errors</a></dt><dt><a href="semantics-declare.html#d0e6759">Softened exceptions</a></dt><dt><a href="semantics-declare.html#d0e6802">Advice Precedence</a></dt><dt><a href="semantics-declare.html#d0e6865">Statically determinable pointcuts</a></dt></dl></dd><dt><a href="semantics-aspects.html">Aspects</a></dt><dd><dl><dt><a href="semantics-aspects.html#d0e6898">Aspect Declaration</a></dt><dt><a href="semantics-aspects.html#d0e6929">Aspect Extension</a></dt><dt><a href="semantics-aspects.html#d0e6949">Aspect instantiation</a></dt><dt><a href="semantics-aspects.html#d0e7112">Aspect privilege</a></dt></dl></dd></dl></div><div class="sect1"><a name="semantics-intro"></a><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="semantics-intro"></a>Introduction</h2></div></div><p> | |
AspectJ extends Java by overlaying a concept of join points onto the | |
existing Java semantics and adding a few new program elements to Java: | |
</p><p> | |
A join point is a well-defined point in the execution of a | |
program. These include method and constructor calls, field accesses and | |
others described below. | |
</p><p> | |
A pointcut picks out join points, and exposes some of the values in the | |
execution context of those join points. There are several primitive | |
pointcut designators, and others can be named and defined by the | |
<tt>pointcut</tt> declaration. | |
</p><p> | |
A piece of advice is code that executes at each join point in a | |
pointcut. Advice has access to the values exposed by the | |
pointcut. Advice is defined by <tt>before</tt>, | |
<tt>after</tt>, and <tt>around</tt> declarations. | |
</p><p> | |
Inter-type declarations form AspectJ's static crosscutting features, | |
that is, is code that may change the type structure of a program, by | |
adding to or extending interfaces and classes with new fields, | |
constructors, or methods. Some inter-type declarations are defined | |
through an extension of usual method, field, and constructor | |
declarations, and other declarations are made with a new | |
<tt>declare</tt> keyword. | |
</p><p> | |
An aspect is a crosscutting type that encapsulates pointcuts, advice, | |
and static crosscutting features. By type, we mean Java's notion: a | |
modular unit of code, with a well-defined interface, about which it is | |
possible to do reasoning at compile time. Aspects are defined by the | |
<tt>aspect</tt> declaration. | |
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="quick-aspectAssociations.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="semantics-joinPoints.html">Next</a></td></tr><tr><td width="40%" align="left">Aspects </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Join Points</td></tr></table></div></body></html> |