001 package org.shiftone.jrat.integration.aop.cglib;
002
003
004 import net.sf.cglib.proxy.MethodProxy;
005 import org.shiftone.jrat.api.Monitor;
006
007 import java.lang.reflect.Method;
008
009
010 /**
011 * @author jeff@shiftone.org (Jeff Drost)
012 */
013 public class CglibMethodInterceptor implements net.sf.cglib.proxy.MethodInterceptor {
014
015 public Object intercept(Object target, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
016
017 // if (Modifier.isAbstract(method.getModifiers())) {
018 // return null; // TODO ??? AbstarctMethodError
019 // }
020 return Monitor.execute(method, target, new CglibMethodInvocationCommand(methodProxy, target, args));
021 }
022 }