001 package org.shiftone.jrat.integration.aop.cglib; 002 003 004 import net.sf.cglib.proxy.MethodProxy; 005 import org.shiftone.jrat.api.Command; 006 007 008 /** 009 * @author jeff@shiftone.org (Jeff Drost) 010 */ 011 public class CglibMethodInvocationCommand implements Command { 012 013 private final Object target; 014 private final Object[] args; 015 private final MethodProxy methodProxy; 016 017 public CglibMethodInvocationCommand(MethodProxy methodProxy, Object target, Object[] args) { 018 019 this.target = target; 020 this.methodProxy = methodProxy; 021 this.args = args; 022 } 023 024 025 public Object execute() throws Throwable { 026 return methodProxy.invoke(target, args); 027 } 028 }