AOP example with APPCs
appc ShowWAccesses {
expected {
Data-To-Access{* write-op(*);}
}
provided{
Data-To-Access {
before write-op {
System.out.println(“W”);
}
}
class Point {
int _x = 0;
int _y = 0;
void set(int x, int y) {
_x = x; _y = y;
}
void setX(int x)
{ _x = x; }
void setY(int y)
{ _y = y; }
int getX(){
return _x; }
int getY(){
return _y; }
}
connector
connector AddShowWAccesses {
connects appl, ShowWAccesses ...
ShowAccesses.Data-To-Access {
… write-op =
set* ...
}
}
Previous slide
Next slide
Back to first slide
View graphic version