ParameterType[] parameterTypes = getParameterTypes(runtime, typeMapper, closureMethod);
// Allow individual methods to set the calling convention to stdcall
CallingConvention callingConvention = closureClass.isAnnotationPresent(StdCall.class)
? CallingConvention.STDCALL : CallingConvention.DEFAULT;
CallContext callContext = getCallContext(resultType, parameterTypes, callingConvention, true);
LocalVariableAllocator localVariableAllocator = new LocalVariableAllocator(parameterTypes);
Class[] javaParameterTypes = new Class[parameterTypes.length];
for (int i = 0; i < parameterTypes.length; i++) {