Language

JniValueMarshaler Class

Definition

Defines managed-to-JNI value conversion and argument-state cleanup.

public abstract class JniValueMarshaler
type JniValueMarshaler = class
Inheritance
JniValueMarshaler
Derived

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.

Constructors

Name Description
JniValueMarshaler()

Initializes the value marshaler base class.

Properties

Name Description
IsJniValueType

Gets whether the marshaler uses a primitive JNI value representation.

MarshalType

Gets the managed type of the native marshaling representation.

Methods

Name Description
CreateArgumentState(Object, ParameterAttributes)

Creates argument state through CreateObjectReferenceArgumentState.

CreateObjectReferenceArgumentState(Object, ParameterAttributes)

Creates argument state containing an object reference for a managed value.

CreateParameterFromManagedExpression(JniValueMarshalerContext, ParameterExpression, ParameterAttributes)

Builds setup and cleanup expressions for a managed argument's JNI handle.

CreateParameterToManagedExpression(JniValueMarshalerContext, ParameterExpression, ParameterAttributes, Type)

Builds an expression that converts a JNI handle through CreateValue.

CreateReturnValueFromManagedExpression(JniValueMarshalerContext, ParameterExpression)

Builds expressions that marshal a managed value and transfer a local JNI reference.

CreateValue(JniObjectReference, JniObjectReferenceOptions, Type)

Converts a JNI object reference to a managed value.

DestroyArgumentState(Object, JniValueMarshalerState, ParameterAttributes)

Completes argument synchronization and releases implementation-owned marshaling state.

DisposeObjectReference(Expression)

Builds a call that disposes a JNI object reference by reference.

ReturnObjectReferenceToJni(JniValueMarshalerContext, String, Expression)

Adds an expression that creates and transfers a local JNI return reference.

Applies to