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 yapbaop.demo;
08:
09: import org.aopalliance.intercept.MethodInterceptor;
10: import org.aopalliance.intercept.MethodInvocation;
11:
12: /**
13: * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
14: */
15: public class DemoAspect implements MethodInterceptor {
16:
17: public Object invoke(MethodInvocation methodInvocation)
18: throws Throwable {
19: System.out.print("DemoAspect.invoke for: ");
20: System.out.print(methodInvocation.getMethod().getName());
21: System.out.println(" on "
22: + ((YapbaopDemo) (methodInvocation.getThis())).m_name);
23: Object rval = methodInvocation.proceed();
24: return rval;
25: }
26: }
|