Documentation for the Unity C# Library
Loading...
Searching...
No Matches
PixoVR.Apex.SafeJNI Class Reference

Static Public Member Functions

static bool SafeCall (this AndroidJavaObject obj, string methodName, params object[] args)
 Calls a void method on a native object using method name with optional arguments.
 
static ReturnType SafeCall< ReturnType > (this AndroidJavaObject obj, string methodName, params object[] args)
 Calls a method on a native object using method name with optional parameters, and returns the result.
 
static bool SafeCallStatic (this AndroidJavaObject obj, string methodName, params object[] args)
 Calls a static void method on a native object using method name with optional arguments.
 
static ReturnType SafeCallStatic< ReturnType > (this AndroidJavaObject obj, string methodName, params object[] args)
 Calls a static method on a native object using method name with optional arguments, and returns the result.
 
static ReturnType SafeGet< ReturnType > (this AndroidJavaObject obj, string fieldName)
 Gets a field of a native object.
 
static ReturnType SafeGetStatic< ReturnType > (this AndroidJavaObject obj, string fieldName)
 Gets a static field of a native object.
 

Static Private Attributes

const string TAG = "SafeJNI"
 

Detailed Description

Definition at line 7 of file SafeJNI.cs.

Member Function Documentation

◆ SafeCall()

static bool PixoVR.Apex.SafeJNI.SafeCall ( this AndroidJavaObject obj,
string methodName,
params object[] args )
inlinestatic

Calls a void method on a native object using method name with optional arguments.

Parameters
obj
methodName
args
Returns
Success: true. Failure: false

Definition at line 86 of file SafeJNI.cs.

◆ SafeCall< ReturnType >()

static ReturnType PixoVR.Apex.SafeJNI.SafeCall< ReturnType > ( this AndroidJavaObject obj,
string methodName,
params object[] args )
inlinestatic

Calls a method on a native object using method name with optional parameters, and returns the result.

Template Parameters
ReturnTypeThe type as which the result should be returned.
Parameters
obj
methodName
args
Returns
Success: The field value. Failure: Default type value.

Definition at line 121 of file SafeJNI.cs.

◆ SafeCallStatic()

static bool PixoVR.Apex.SafeJNI.SafeCallStatic ( this AndroidJavaObject obj,
string methodName,
params object[] args )
inlinestatic

Calls a static void method on a native object using method name with optional arguments.

Parameters
obj
methodName
args
Returns
Success: true. Failure: false

Definition at line 18 of file SafeJNI.cs.

◆ SafeCallStatic< ReturnType >()

static ReturnType PixoVR.Apex.SafeJNI.SafeCallStatic< ReturnType > ( this AndroidJavaObject obj,
string methodName,
params object[] args )
inlinestatic

Calls a static method on a native object using method name with optional arguments, and returns the result.

Template Parameters
ReturnTypeThe type as which the result should be returned.
Parameters
obj
methodName
args
Returns
Success: The JNI result. Failure: Default type value.

Definition at line 53 of file SafeJNI.cs.

◆ SafeGet< ReturnType >()

static ReturnType PixoVR.Apex.SafeJNI.SafeGet< ReturnType > ( this AndroidJavaObject obj,
string fieldName )
inlinestatic

Gets a field of a native object.

Template Parameters
ReturnTypeThe type as which the field should be retrieved.
Parameters
obj
fieldName
Returns
Success: The field value. Failure: Default type value.

Definition at line 184 of file SafeJNI.cs.

◆ SafeGetStatic< ReturnType >()

static ReturnType PixoVR.Apex.SafeJNI.SafeGetStatic< ReturnType > ( this AndroidJavaObject obj,
string fieldName )
inlinestatic

Gets a static field of a native object.

Template Parameters
ReturnTypeThe type as which the field should be retrieved.
Parameters
obj
fieldName
Returns
Success: The field value. Failure: Default type value.

Definition at line 154 of file SafeJNI.cs.

Member Data Documentation

◆ TAG

const string PixoVR.Apex.SafeJNI.TAG = "SafeJNI"
staticprivate

Definition at line 9 of file SafeJNI.cs.


The documentation for this class was generated from the following file: