a coordination aspect language
coordinator Shape {
selfex adjustLocation;
selfex adjustSize;
mutex {adjustLocation, getX};
mutex {adjustLocation, getY};
mutex {adjustSize, getWidth};
mutex {adjustSize, getHeight};
}
public class Shape {
protected int x = 0;
protected int y = 0;
protected int w = 0;
protected int h = 0;
int getX() { return x; }
int getY() { return y; }
int getWidth(){ return w; }
int getHeight(){ return h; }
void adjustLocation() {
x = longCalculation1();
y = longCalculation2();
}
void adjustSize() {
w = longCalculation3();
h = longCalculation4();
}
}
Previous slide
Next slide
Back to first slide
View graphic version