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{
// ...
}
}