70 likes | 165 Views
General AOP: Join Point Model. Set of all join points. A mechanism to express subsets of join points. A mechanism to express advice on subsets of join points. Sets of join points. AspectJ’s set of join points: JPTA = <jp> JoinPoint <children> List(JPTA).
E N D
General AOP: Join Point Model • Set of all join points. • A mechanism to express subsets of join points. • A mechanism to express advice on subsets of join points.
Sets of join points • AspectJ’s set of join points: • JPTA = <jp> JoinPoint <children> List(JPTA). • JoinPoint : Call | Execution | Get | Set | … • Our set of join points: JPT, dynamic JPT, lexical JPT. • JPT = <jp> JoinPoint <children> List(JPT). • JoinPoint = /* message send */ <target> ID <args> List(ID) <returning> ID.
Sets of Join Points • Dynamic JPT: ID = object • Lexical JPT: ID = class
Pattern Matching in Join Point Trees JPT = <jp> JoinPoint <children> List(JPT). JoinPoint = <target> ID <args> List(ID) <returning> ID <name> JPName. ID = Ident. JPName = Ident. target=T, enclosing.target=T, args=(X,Y), name = foo target(T), this(T), args(X,Y), call(* foo(..))
Simple exercise • Given a Java program and an input, print the corresponding join point tree.
What can we do with join point trees? • Define interesting sets