Click or drag to resize

IJVMWrapperDirectNewArrayTArrayType(ReadOnlySpanTArrayType) Method

Creates a new Java array from a read-only span of elements.

Namespace: MASES.JCOBridge.C2JBridge.JVMInterop
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.10.261112-5ffe0920c00dbac056780af7ab9b1978b26ef4a5
Syntax
IJavaArray NewArray<TArrayType>(
	ReadOnlySpan<TArrayType> data
)
where TArrayType : struct, new()

Parameters

data  ReadOnlySpanTArrayType
The span of elements to copy into the Java array.

Type Parameters

TArrayType
The type of the array elements. Only the primitive types Boolean, Byte, Char, Int16, Int32, Int64, Single and Double are supported.

Return Value

IJavaArray
An IJavaArray instance wrapping the newly created Java array.
Exceptions
ExceptionCondition
NotSupportedExceptionThe engine is not an HPA edition, or TArrayType is not one of the supported primitive types.
Remarks

Supported only on the HPA Edition. The method is part of the public API on every edition so that code can be written once and adapted at runtime: check IsHPAEdition before calling it.

A ReadOnlySpanT cannot be boxed, so it cannot be passed through object-based or dynamic invocations: use this typed overload directly.

See Also