Qore jni Module  1.0.1
Jni::org::qore::jni::JavaArray Class Reference

Instances of this class represent Java arrays. More...

Inherits Object.

Public Member Methods

string deepToString ()
 Returns a "deep" string representation of the array. More...
 
auto get (int index)
 Retrieves an element. More...
 
Class getClass ()
 Returns the class of the object. More...
 
int length ()
 Returns the length of the array. More...
 
nothing set (int index, any value)
 Sets the value of a an element. More...
 
string toString ()
 Returns a string representation of the array. More...
 

Static Public Member Methods

static JavaArray get (binary b)
 Returns a byte[] array for the binary object as an explicit conversion. More...
 

Detailed Description

Instances of this class represent Java arrays.

Member Function Documentation

◆ deepToString()

string Jni::org::qore::jni::JavaArray::deepToString ( )

Returns a "deep" string representation of the array.

Code Flags:
CONSTANT
Example:
string str = a.deepToString();
Returns
a "deep" string representation of the array by calling java.util.Arrays.deepToString()
Since
jni 1.1

◆ get() [1/2]

auto Jni::org::qore::jni::JavaArray::get ( int  index)

Retrieves an element.

Parameters
indexthe 0-based index of the element
Returns
the value of the element
Exceptions
JNI-ERRORif the index is out of bounds

◆ get() [2/2]

static JavaArray Jni::org::qore::jni::JavaArray::get ( binary  b)
static

Returns a byte[] array for the binary object as an explicit conversion.

Code Flags:
CONSTANT
Example:
JavaArray a = JavaArray::get(bin);
Returns
a byte[] array for the binary object as an explicit conversion
Since
jni 1.1

◆ getClass()

Class Jni::org::qore::jni::JavaArray::getClass ( )

Returns the class of the object.

Returns
the class of the object

◆ length()

int Jni::org::qore::jni::JavaArray::length ( )

Returns the length of the array.

Returns
the length of the array

◆ set()

nothing Jni::org::qore::jni::JavaArray::set ( int  index,
any  value 
)

Sets the value of a an element.

Parameters
indexthe 0-based index of the element
valuethe value of the element
Exceptions
JNI-ERRORif the index is out of bounds or if the value type is incompatible with the array type

◆ toString()

string Jni::org::qore::jni::JavaArray::toString ( )

Returns a string representation of the array.

Code Flags:
CONSTANT
Example:
string str = a.toString();
Returns
a string representation of the array by calling java.util.Arrays.toString()
Since
jni 1.1

The documentation for this class was generated from the following file: