AspectJ’s Moving Parts
Definitions
- Join Point - A well-defined point in the program flow; a specific line of code in a specific class file.
- Pointcut - Picks out certain join points and values at those points; A collection of join points across classes that meet similar criteria.
- Advice - Code that is executed when a join point is reached; brings together a pointcut (to pick out join points) and a body of code (to run at each of those join points).
- Aspect - The unit of modularity for crosscutting concerns. They behave somewhat like Java classes, but may also include pointcuts, advice and inter-type declarations.
- Inter-type Declarations - declarations that cut across classes and their hierarchies; may declare members that cut across multiple classes, or change the inheritance relationship between classes.
General Goodies
- Pointcuts and advice dynamically affect program flow, inter-type declarations statically affects a program’s class hierarchy, and aspects encapsulate these new constructs.