modify

context(env: JniEnv, placement: NativePlacement)
inline fun JBooleanArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<UByteVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with boolean array's elements via getElements and releasing it with releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if getElements fails.

block

code to execute with the retrieved C array and copy marker.


context(env: JniEnv, placement: NativePlacement)
inline fun JByteArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<ByteVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with byte array's elements via JByteArray.getElements and releasing it with JByteArray.releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if JByteArray.getElements fails.

block

code to execute with the retrieved C array and copy marker.


context(env: JniEnv, placement: NativePlacement)
inline fun JCharArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<UShortVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with char array's elements via JCharArray.getElements and releasing it with JCharArray.releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if JCharArray.getElements fails.

block

code to execute with the retrieved C array and copy marker.


context(env: JniEnv, placement: NativePlacement)
inline fun JShortArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<ShortVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with short array's elements via JShortArray.getElements and releasing it with JShortArray.releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if JShortArray.getElements fails.

block

code to execute with the retrieved C array and copy marker.


context(env: JniEnv, placement: NativePlacement)
inline fun JIntArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<IntVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with int array's elements via JIntArray.getElements and releasing it with JIntArray.releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if JIntArray.getElements fails.

block

code to execute with the retrieved C array and copy marker.


context(env: JniEnv, placement: NativePlacement)
inline fun JLongArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<LongVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with long array's elements via JLongArray.getElements and releasing it with JLongArray.releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if JLongArray.getElements fails.

block

code to execute with the retrieved C array and copy marker.


context(env: JniEnv, placement: NativePlacement)
inline fun JFloatArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<FloatVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with float array's elements via JFloatArray.getElements and releasing it with JFloatArray.releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if JFloatArray.getElements fails.

block

code to execute with the retrieved C array and copy marker.


context(env: JniEnv, placement: NativePlacement)
inline fun JDoubleArray.modify(onError: () -> Unit, block: ModifyingArrayScope.(CArrayPointer<DoubleVar>, isCopy: Boolean) -> Unit)(source)

Alias for working with double array's elements via JDoubleArray.getElements and releasing it with JDoubleArray.releaseElements.

You can access commit, finalize and abort methods inside block.

Parameters

onError

code to execute if JDoubleArray.getElements fails.

block

code to execute with the retrieved C array and copy marker.