Information Technology Reference
In-Depth Information
Table 1. Matching rules for start points on pointcut maps and base maps
Base map's
start
point 1) is
named and
inside
component
(Fig. 12 (a))
Base map's
start point
is named
and outside
component
(Fig. 12 (b))
Base map's
start point
is named
differently
and inside
component
(Fig. 12 (c))
Base map's
start point
is named
differently
and outside
component
(Fig. 12 (d))
Do the base map
and the pointcut
map match?
Pointcut map's start
point 1) is named and
inside component
(Fig. 12 (e))
yes
no 2)
no 3)
no 3)
Pointcut map's start
point is named and
outside component
(Fig. 12 (f))
no 2)
no 3)
no 3)
yes
Pointcut map's start
point is unnamed and
inside component
(Fig. 12 (g))
yes 4)
yes 4)
yes
yes
Pointcut map's start
point is unnamed and
outside component
(Fig. 12 (h))
no 5)
no 5)
yes
yes
1) The same reasoning applies to end points.
2) The pointcut expression stipulates that there has to be a start
point with name abc inside or outside component abc . Therefore, there
is no match if the start point in the base map is not inside or outside
component abc , respectively.
3) There is no match in this case because the names do not match.
4) This pointcut expression does not require the path to cross com-
ponent abc , but it also does not exclude it. Therefore, the base map is
matched although the start point is outside of component abc .
5) This pointcut expression requires the path to cross the compo-
nent because the start point is outside of component abc . Therefore, the
start point in the base map cannot be inside component abc .
3.4
Advice Map Revisited
At this point, the advice defined on advice maps still needs to be woven into the
base system with the help of the pointcuts defined on pointcut maps. Somehow,
advice and pointcuts need to be linked. Advice may be executed before, after, or
around joinpoints identified by many pointcuts. To achieve this, a dynamic stub
called the pointcut stub is added to the advice map introduced in Sect. 3.2. The
plug-ins of the pointcut stub are the pointcut maps discussed in Sect. 3.3. For
example, the pointcut map in Fig. 11d could be plugged into the pointcut stubs
 
Search WWH ::




Custom Search