Class JNIExtensions
- Namespace
- Uralstech.UXR.QuestCamera
QOL extensions for the JNI.
public static class JNIExtensions
- Inheritance
-
objectJNIExtensions
Methods
GetNullableFloat(AndroidJavaObject, string)
Unboxes a native nullable float field into an float?.
public static float? GetNullableFloat(this AndroidJavaObject current, string fieldName)
Parameters
currentAndroidJavaObjectfieldNamestring
Returns
- float?
GetNullableInt(AndroidJavaObject, string)
Unboxes a native nullable integer field into an int?.
public static int? GetNullableInt(this AndroidJavaObject current, string fieldName)
Parameters
currentAndroidJavaObjectfieldNamestringThe field to unbox.
Returns
- int?
The unboxed value.
UnboxAndCreateGlobalRefForByteBufferElement(nint, int)
Unboxes and creates a global ref of a native ByteBuffer from a native Object array, and returns its direct buffer address.
public static (nint obj, nint ptr) UnboxAndCreateGlobalRefForByteBufferElement(nint args, int index)
Parameters
argsnintThe native array to take the buffer from.
indexintThe index of the buffer object in the native array.
Returns
- (nint obj, nint ptr)
The global reference and the direct buffer address.
UnboxBoolElement(nint, int)
Unboxes a boolean from a native Object array.
public static bool UnboxBoolElement(nint args, int index)
Parameters
argsnintThe native array to take the boolean from.
indexintThe index of the boolean object in the native array.
Returns
- bool
The unboxed boolean.
UnboxIntElement(nint, int)
Unboxes an integer from a native Object array.
public static int UnboxIntElement(nint args, int index)
Parameters
argsnintThe native array to take the integer from.
indexintThe index of the integer object in the native array.
Returns
- int
The unboxed integer.
UnboxLongElement(nint, int)
Unboxes a long from a native Object array.
public static long UnboxLongElement(nint args, int index)
Parameters
argsnintThe native array to take the long from.
indexintThe index of the long object in the native array.
Returns
- long
The unboxed long.
UnboxStringElement(nint, int)
Unboxes a string from a native Object array.
public static string? UnboxStringElement(nint args, int index)
Parameters
argsnintThe native array to take the string from.
indexintThe index of the string object in the native array.
Returns
- string
The unboxed string.