this.functionInvoker = invoker;
this.marshallers = marshallers;
}
public final Object invoke(Object self, Object[] parameters) {
InvocationSession session = new InvocationSession();
HeapInvocationBuffer buffer = new HeapInvocationBuffer(function.getCallContext());
try {
if (parameters != null) for (int i = 0; i < parameters.length; ++i) {
marshallers[i].marshal(session, buffer, parameters[i]);
}
return functionInvoker.invoke(runtime, function, buffer);
} finally {
session.finish();
}
}