KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > spring > aop > SimpleMethodInterceptor


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tctest.spring.aop;
5
6 import org.aopalliance.intercept.MethodInterceptor;
7 import org.aopalliance.intercept.MethodInvocation;
8
9 public class SimpleMethodInterceptor implements MethodInterceptor {
10
11   public Object JavaDoc invoke(MethodInvocation methodInvocation) throws Throwable JavaDoc {
12     Logger.log += "before-around args(" + methodInvocation.getArguments()[0] + ") this(" + methodInvocation.getThis().getClass().getName() + ") ";
13     Object JavaDoc result = methodInvocation.proceed();
14     Logger.log += "after-around ";
15     return result;
16   }
17
18 }
19
Popular Tags