CopyToJavaArray
Mon 01 January 2018Syntax
CopyToJavaArray(&PeopleCodeArray, JavaArray [, &RestrictionArray])
Description
Use the CopyToJavaArray function to copy the one-dimensional array specified by &PeopleCodeArray into the Java array JavaArray . The Java array must be at least as large as the PeopleCode array.
The optional &RestrictionArray parameter is a PeopleCode array that contains the index elements of the elements to copy. For example if &RestrictionArray contains the indexes 3, 5 and 7, only elements 3, 5 and 7 in the PeopleCode array are copied to the Java array, and they are copied to the elements 3, 5 and 7. This allows you to minimize the copying when you have arrays that donât require a full element by element copy. If &RestrictionArray is not specified, a complete array copy is done.
The array types between the PeopleCode array and the Java array must match the standard type mapping between Java and PeopleCode types. For example, trying to copy a PeopleCode array of Any into a Java array of int will fail because the Any PeopleCode type doesn't map onto the Java int type.
Parameters
Field or Control |
Definition |
---|---|
&PeopleCodeArray |
Specify an already instantiated and populated one-dimentional PeopleCode array that contains the information you want to copy to a Java array. |
JavaArray |
Specify the Java array that you want to copy information into. |
&RestrictionArray |
Specify an already instantiated and populated PeopleCode array that contains the set of elements the copy is restricted to. This array should be of type number. |
Returns
None.