60 likes | 158 Views
basis of crosscutting. a join point model (JPM) has 3 critical elements what are the join points in AspectJ points in runtime call graph class members means of identifying join points in AspectJ signatures (plus …) means of specifying semantics at join points in AspectJ advice
E N D
basis of crosscutting • a join point model (JPM) has 3 critical elements • what are the join points • in AspectJ • points in runtime call graph • class members • means of identifying join points • in AspectJ • signatures (plus …) • means of specifying semantics at join points • in AspectJ • advice • define members 1/14/02 UCSD
basis of crosscutting • a join point model (JPM) has 3 critical elements • what are the join points • in AspectJ • points in runtime call graph • class members • means of identifying join points • in AspectJ • pointcuts • member signatures (plus …) • means of specifying semantics at join points • in AspectJ • advice • define members dynamic JPMstatic JPM 1/14/02 UCSD
range of AOP languages See next slide for changes to AspectJ and Demeter 1/14/02 UCSD
range of AOP languages 1/14/02 UCSD
Composing join point models • Traversal Spec JPM: In Demeter we use traversal specifications and the class graph to introduce traversal methods to a set of classes. • Visitor JPM: The result of Traversal Spec. JPM is used to define a second JPM: • The traversal methods define nodes and edge visits. • Visitor signatures define the nodes and edges where additional advice is needed: they are the means of identifying join points. • The means of specifying semantics at join points are the visitor bodies. 1/14/02 UCSD
foo dynamic JPM (~ AspectJ) what happens in pattern bar Composition Patterns static JPM (~ Hyper/J) binds pattern to base code UML class & interaction diagrams already crosscut by-class vs. by-interaction organizations AO design in UML [Clarke, Walker] 1/14/02 UCSD