general aop: join point model

6
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.

Upload: jerome-grimes

Post on 30-Dec-2015

24 views

Category:

Documents


2 download

DESCRIPTION

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 = JoinPoint List(JPTA). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: General AOP: Join Point Model

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.

Page 2: General AOP: Join Point Model

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.

Page 3: General AOP: Join Point Model

Sets of Join Points

• Dynamic JPT: ID = object

• Lexical JPT: ID = class

Page 4: General AOP: Join Point Model

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(..))

Page 5: General AOP: Join Point Model

Simple exercise

• Given a Java program and an input, print the corresponding join point tree.

Page 6: General AOP: Join Point Model

What can we do with join point trees?

• Define interesting sets