private static ParameterType getParameterType(jnr.ffi.Runtime runtime, Class type, Collection<Annotation> annotations,
jnr.ffi.mapper.ToNativeType toNativeType, ToNativeContext toNativeContext) {
ToNativeConverter toNativeConverter = toNativeType != null ? toNativeType.getToNativeConverter() : null;
NativeType nativeType = getMethodParameterNativeType(runtime,
toNativeConverter != null ? toNativeConverter.nativeType() : type, annotations);
return new ParameterType(type, nativeType, annotations, toNativeConverter, toNativeContext);
}