Language

JniValueMarshaler.ReturnObjectReferenceToJni Method

Definition

Adds an expression that prepares a JNI return handle.

protected System.Linq.Expressions.Expression ReturnObjectReferenceToJni(Java.Interop.Expressions.JniValueMarshalerContext context, string? namePrefix, System.Linq.Expressions.Expression sourceValue);
member this.ReturnObjectReferenceToJni : Java.Interop.Expressions.JniValueMarshalerContext * string * System.Linq.Expressions.Expression -> System.Linq.Expressions.Expression

Parameters

context
JniValueMarshalerContext

Collects the return local and its assignment.

namePrefix
String

The prefix for the generated return-variable name.

sourceValue
Expression

The JniObjectReference expression to transfer as a JNI return.

Returns

The local-variable expression containing a local reference handle, or zero if the source reference is invalid.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to