/************************************************
 * Copyright (c) Shen Li. All rights reserved.  *
 * http://joyaop.sourceforge.net                *
 * -------------------------------------------- *
 * Distributable under LGPL license.            *
 * See terms of license at gnu.org.             *
 ************************************************/
package net.sf.joyaop.demo.simple;

import net.sf.joyaop.Interceptor;
import net.sf.joyaop.Invocation;

/**
 * @author Shen Li
 */
public class FooInterceptor implements Interceptor {
    public Object intercept(Invocation invocation) throws Throwable {
        System.out.println();
        System.out.println("invoke FooInterceptor...");
        System.out.println("method name: " + invocation.getMethod().getName());
        System.out.println("argument array length: " + invocation.getArguments().length);
        System.out.println("paramter value: " + invocation.getParameter("paramName"));
        System.out.println("proxy class name: " + invocation.getProxy().getClass().getName());
        return invocation.proceed();
    }
}
