The example program shows a declaration of a warning which matches all calls to constructors of classes found in packages ending in the digit 1, with classname Foo or a subclass of Foo.
Pointcut declarations are provided in AspectJ as a way of defining a named pointcut. In the example program in Figure 1 two such declarations are given, one for notKeywords and another for hasSpecialIf. Inside pointcut declarations a pointcut lexical scope begins immediately following the pointcut keyword and ends after the ; terminating the pointcut declaration. Pointcut declarations can appear both inside aspects and inside ordinary Java classes.
Advice declarations have a pointcut expression in their header. All such pointcuts will be preceded by one of the keywords before, after or around. For example, in Figure 1, a pointcut follows an after keyword. The pointcut ends before the body of the pointcut begins, signalled by a {.
Thus, a pointcut context starts immediately after a before, after or around token, and ends at the first opening brace encountered.