Language

JniValueMarshaler<T> Class

Definition

Supplies typed conversion and argument-state operations for a managed value type.

public abstract class JniValueMarshaler<T> : Java.Interop.JniValueMarshaler
type JniValueMarshaler<'T> = class
    inherit JniValueMarshaler

Type Parameters

T

The managed value type handled by the marshaler.

Inheritance
JniValueMarshaler<T>
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<T>()

Initializes the typed value marshaler base class.

Properties

Name Description
IsJniValueType

Gets whether the marshaler uses a primitive JNI value representation.

(Inherited from JniValueMarshaler)
MarshalType

Gets the managed type of the native marshaling representation.

(Inherited from JniValueMarshaler)

Methods

Name Description
CreateArgumentState(Object, ParameterAttributes)

Casts an object to T and creates typed argument state.

CreateGenericArgumentState(T, ParameterAttributes)

Creates typed argument state. The base implementation delegates to CreateGenericObjectReferenceArgumentState.

CreateGenericObjectReferenceArgumentState(T, ParameterAttributes)

Creates object-reference argument state for a typed value.

CreateGenericValue(JniObjectReference, JniObjectReferenceOptions, Type)

Converts a JNI object reference to a value of T.

CreateObjectReferenceArgumentState(Object, ParameterAttributes)

Casts an object to T and creates typed object-reference argument state.

CreateParameterFromManagedExpression(JniValueMarshalerContext, ParameterExpression, ParameterAttributes)

Creates an expression for a managed argument's JNI representation. The base implementation adds setup and cleanup for a JNI object reference.

(Inherited from JniValueMarshaler)
CreateParameterToManagedExpression(JniValueMarshalerContext, ParameterExpression, ParameterAttributes, Type)

Creates an expression that converts a JNI argument to a managed value. The base implementation converts a JNI handle through CreateValue.

(Inherited from JniValueMarshaler)
CreateReturnValueFromManagedExpression(JniValueMarshalerContext, ParameterExpression)

Creates expressions for a managed return value. The base implementation prepares a JNI return handle.

(Inherited from JniValueMarshaler)
CreateValue(JniObjectReference, JniObjectReferenceOptions, Type)

Converts a JNI reference to a managed value. The generic base implementation calls CreateGenericValue.

DestroyArgumentState(Object, JniValueMarshalerState, ParameterAttributes)

Cleans up argument state. The generic base implementation casts the value to T and invokes typed cleanup.

DestroyGenericArgumentState(T, JniValueMarshalerState, ParameterAttributes)

Completes synchronization and cleanup for a typed argument.

ReturnObjectReferenceToJni(JniValueMarshalerContext, String, Expression)

Adds an expression that prepares a JNI return handle.

(Inherited from JniValueMarshaler)

Applies to