}
private Object valueToArray( Class<?> arrayComponentType,
Object value ) throws Exception {
if (value instanceof Array) {
Array valueArray = (Array)value;
int arraySize = valueArray.size();
Object newArray = java.lang.reflect.Array.newInstance(arrayComponentType, arraySize);
for (int i = 0; i < ((Array)value).size(); i++) {
Object element = valueArray.get(i);
element = convertValueToType(arrayComponentType, element);
java.lang.reflect.Array.set(newArray, i, element);
}
return newArray;
} else if (value instanceof String) {