For all referenced Java array types, an array proxy class is generated, which contains:
For all array types, a constructor that takes the array size as a parameter; for example, the following line creates an instance of A_B_MyClassArray, with a size of three:
A_B_MyClassArray mca = new_A_B_MyClassArray(3);
For arrays of primitive Java types only, a constructor that takes an array size parameter and initial values.
jbyte values[] = { 0, 1, 2 }; java_byteArray jba = new_java_byteArray(3, &values);
Array proxy classes overload the C++ array indexing operator, which is zero-based, as in Java.
To get the second element of an array:
jbyte a1 = jba[1];
To set the third element of an array with the value from the second element:
jba[2] = jba[1];