Prametric Pointcuts

どうやってポイントカットの再利用性を向上させる? or どこでポイントカットのコードの重複が起こる? or ポイントカットの変化点はどこ?


一つは、メソッド名に関連するものがあげられるきがする:


public aspect PointLogging {
before() : call(void Point.setX(int) ) {
// ...
}
before() : call(void Point.setY(int) ) {
// ...
}
}
もし、パラメトリックにポイントカットを定義できたとすると:

public aspect PointLogging {

pointcut set() : call(void Point.Method(int) );

before() : set {
// ...
}
before() : set {
// ...
}
}

みたいな。