blob: 24c25a89e07c3f1850d831c50d5e812f6dbd8a5f [file] [log] [blame]
package org.apache.bsf.util;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import javax.script.Invocable;
/**
* @author Sanka Samaranayake <ssanka@gmail.com>
*
*/
public class BSFInvocationHandler implements InvocationHandler {
private Invocable engine;
private Object target;
public BSFInvocationHandler(Invocable engine) {
this.engine = engine;
}
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
return engine.call(method.getName(), args);
}
}