This API documentation is for Ballerina 1.2.0. View API documentation for the latest release.

Module : java.arrays

Module Overview

This module provides APIs to create new Java array instances, get elements from arrays, set elements, etc.

For information on the operations, which you can perform with the java.arrays module, see the below Functions. For an example on the usage of the operations, see the Java Arrays Example.

Functions

fromHandle

Returns a Ballerina array for a handle that holds a Java array.

get

Returns a handle, which refers to the element at the specified index in the given Java array.

getLength

Returns the length of the given Java array.

newInstance

Returns a new Java array instance with the specified element type and dimensions.

set

Replaces the indexed element at the specified index in the given Java array with the specified element.

toHandle

Returns a handle value representation for a Ballerina array.