public interface MethodInterceptor extends Interceptor { Object invoke(MethodInvocation invocation) throws Throwable; }
⁄⁄Adviceの定義(Joinpointで実行される振る舞い) private class SpecialInterceptor implements MethodInterceptor { public Object invoke(MethodInvocation invocation) throws Throwable { ⁄⁄メソッド呼び出し前の処理を記述 System.out.println("前処理"); ⁄⁄実際のメソッド呼び出し Object result = invocation.proceed(); ⁄⁄メソッド呼び出し後の処理を記述 System.out.println("後処理"); return result; } (以下省略)
カテゴリー
チャンネル
ニュース
テクノロジーポータルTEDIA パッケージソフトウェアならFind-IT エレクトロニクスならEETimes Japan
| 本サイトのご利用について | お問い合わせ | プライバシーについて | 会社概要 | インプレスグループサイト | インプレスグループTOP |
Copyright ©2004-2009 IMPRESS BUSINESS MEDIA CORPORATION, an Impress Group company. All rights reserved.