>>366
// 先のロギングの例をアスペクト(AspectJ)で書くと…
aspect Logging {
 /* execution() 内部に書かれているメソッドの実行に対して動作
   従来は,各メソッドの先頭にこのコードを書かないといけなかったが
   アスペクトを使うと,オブジェクト側のコードには何も書かなくてよい.*/
 around: execution(void Foo.foo()) ||
   execution(void Bar.doSomething()) ||
   execution(static void Baz.doSomething())) {
  // この実行時点(join point)で,呼び出されているメソッドを記録
  // thisJoinPoint はどのメソッド呼び出しに相当するかの情報を持っている
  logger.log("start - " + thisJoinPoint.getSignature());
  // 呼び出されているメソッドの実行
  proceed();
  logger.log("end - " + thisJoinPoint.getSignature());
 }
}
引用先 ttp://sel.ics.es.osaka-u.ac.jp/research/aspect/index.html.ja