Introduction


A join point is a specific point at which advice can be woven into the code of an application. Pointcuts provide logical definitions for picking the join points that will invoke a piece of advice.

The next nine chapters correspond to the types of Java language constructs that contain join points that can be captured using pointcut declarations in AspectJ. This chapter focuses on pointcuts that can capture the selection of join points that are available on Java methods.

The before( ) form of advice is used for most of these pointcut-based recipes that make up the next eight chapters to avoid confusing things by using different types of advice. Where it's unavoidable, other forms of advice may have to be used, so it might be helpful to refer to Chapter 9 to understand the implications that the different forms of advice bring to the solutions provided.

Once you have grasped the different types of pointcut that AspectJ provides in Chapter 4 through Chapter 12, check out Mik Kersten's standard pointcut idioms by going to http://www.eclipse.org/aspectj and then by clicking on Documentation standard pointcut idioms. These reusable pointcut definitions provide some great tools with which to construct your own pointcut logic.




AspectJ Cookbook
Aspectj Cookbook
ISBN: 0596006543
EAN: 2147483647
Year: 2006
Pages: 203
Authors: Russ Miles

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net