}
}
public Object call(Object recv, String method, Object[] args) throws BSFException {
try {
EmbedRubyObjectAdapter adapter = container.newObjectAdapter();
if (args == null) {
return adapter.callMethod(recv, method, Object.class);
} else {
return adapter.callMethod(recv, method, args, Object.class);
}
} catch (Exception excptn) {
throw new BSFException(BSFException.REASON_EXECUTION_ERROR, excptn.getMessage(), excptn);
}
}