Class boxedType = toNativeConverter != null ? toNativeConverter.nativeType() : javaType;
NativeType nativeType = Types.getType(runtime, boxedType, annotations).getNativeType();
jnr.ffi.provider.ToNativeType toNativeType = new jnr.ffi.provider.ToNativeType(javaType, nativeType, annotations, toNativeConverter, null);
jnr.ffi.provider.FromNativeType fromNativeType = new jnr.ffi.provider.FromNativeType(javaType, nativeType, annotations, fromNativeConverter, null);
Variable variable;
Pointer memory = MemoryUtil.newPointer(runtime, symbolAddress);
variable = getNativeVariableAccessor(memory, toNativeType, fromNativeType);
return toNativeType.getToNativeConverter() != null
? getConvertingVariable(variable, toNativeType.getToNativeConverter(), fromNativeType.getFromNativeConverter())
: variable;
}