01: /**************************************************************************************
02: * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package test.aopalliance.aspect;
08:
09: import test.aopalliance.Test;
10: import org.aopalliance.intercept.MethodInterceptor;
11: import org.aopalliance.intercept.MethodInvocation;
12:
13: /**
14: * Test interceptor for the Aop Alliance compiler extension to AspectWerkz.
15: *
16: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
17: */
18: public class TestInterceptor implements MethodInterceptor {
19:
20: public Object invoke(MethodInvocation invocation) throws Throwable {
21: Test.log("before-intercept ");
22: Test.log(invocation.getMethod().getName() + ' ');
23: Test.log(invocation.getThis().getClass().getName() + ' ');
24: invocation.getArguments();
25: Object rval = invocation.proceed();
26: Test.log("after-intercept ");
27: return rval;
28: }
29: }
|