Information Technology Reference
In-Depth Information
add disjointPaths to updatedMaps
foreach mapped PathNode pn of disjointPaths
// A mapped path node is either a new start point or a new end point.
// Scan disjointPaths to find the corresponding end or start point,
// respectively. In case of a new start point, DisjointPath is scanned
// forward. In case of a new end point, DisjointPath is scanned
// backwards. Scan throws a MalformedAdviceMap exception if no or
// more than one corresponding path node is found.
PathNode correspondingPathNode = disjointPaths.scan(pn)
// Remembering the correspondingPathNode for each pn essentially
// duplicates the mapping from pn to the path node in the base model
// for the correspondingPathNode.
pn.addCorrespondingPathNode(correspondingPathNode)
endforeach // PathNode
foreach mapped PathNode pn of disjointPaths
// Go through all mappings and references created by
// removePointcutStubs
foreach Mapping m of pn
// Insert a stub at the path node in the base model identified by m
// (see (a) above). The insertion point is on the path segment
// towards the referenced path node of pn for the mapping m (see
// (b) above). Plug-in bindings are also established from the stub to
// pn and to pn.getCorrespondingPathNode.
// If a stub has already been inserted at the same location, a new
// stub is not inserted but the existing stub is made dynamic (if it is
// static) and only a new plug-in map is added.
// If the path of pn is marked as around advice, then the inserted
// stub is labeled with up and down indicators.
// If the path of pn is marked as strong around advice, then the out-
// path or in-path of the inserted stub is removed (if pn is an end or
// start point, respectively). The corresponding plug-in binding is also
// removed.
UCMmap updatedBaseMap = m.getBaseMap().insertStub(m)
add updatedBaseMap to updatedMaps
endforeach // Mapping
endforeach // PathNode
endif
endforeach // UCMadviceMap
if updatedMaps == Ø then
// No composition occurred because no mappings were established.
throw new CompositionNotRequired()
endif
return updatedMaps
end // composeAspect
 
Search WWH ::




Custom Search