Create an Object array for the given array.

@param o An array.
@return A new object array.
517767
public static Object[] toObjectArray(Object o) {

        Class clas = o.getClass().getComponentType();

        if (null == clas) return null;

        Object[] arr;

        if (clas == Boolean.TYPE) {
            boolean[] src = (boolean[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Boolean(src[i]);
        } else if (clas == Character.TYPE) {
            char[] src = (char[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Character(src[i]);
        } else if (clas == Byte.TYPE) {
            byte[] src = (byte[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Byte(src[i]);
        } else if (clas == Short.TYPE) {
            short[] src = (short[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Short(src[i]);
        } else if (clas == Integer.TYPE) {
            int[] src = (int[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Integer(src[i]);
        } else if (clas == Long.TYPE) {
            long[] src = (long[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Long(src[i]);
        } else if (clas == Float.TYPE) {
            float[] src = (float[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Float(src[i]);
        } else if (clas == Double.TYPE) {
            double[] src = (double[]) o;
            arr = new Object[src.length];
            for (int i = 0; i < src.length; i++)
                arr[i] = new Double(src[i]);
        } else {
            arr = (Object[]) o;
        }
        return arr;
    }
984202
public static Array array(Object array) {
        if (array instanceof Object[]) {
            return array((Object[]) array);
        }
        switch (tId(array.getClass())) {
            case I_BOOLEAN:     return array((boolean[]) array);
            case I_BYTE:        return array((byte[]) array);
            case I_CHARACTER:   return array((char[]) array);
            case I_DOUBLE:      return array((double[]) array);
            case I_FLOAT:       return array((float[]) array);
            case I_INTEGER:     return array((int[]) array);
            case I_LONG:        return array((long[]) array);
            case I_SHORT:       return array((short[]) array);
        }
        throw new IllegalArgumentException("No array: " + array);
    }
1300482
public static Object[] appendArray(Object[] arr, Object obj) {
		Object[] newArr = new Object[arr.length + 1];
		System.arraycopy(arr, 0, newArr, 0, arr.length);
		newArr[arr.length] = obj;
		return newArr;
	}
1215029
public static <T> List<T> arrayToList(T[] array) {
        List<T> list = null;
        if (array != null) {
            list = new ArrayList<>();
            for (T e : array) {
                list.add(e);
            }
        }
        return list;
    }
325146
@SuppressWarnings({"unchecked", "unused"})
    public static <T> T[] object2Array(final Class<T> clazz, final Object obj) {
        return (T[]) obj;
    }
958368
public static Object toArray( JSONArray jsonArray, Class objectClass ) {
      JsonConfig jsonConfig = new JsonConfig();
      jsonConfig.setRootClass( objectClass );
      return toArray( jsonArray, jsonConfig );
   }
563034
public static Object[] copy(Object[] objs)
	{
		if (objs == null)
			return null;

		Object[] results = new Object[objs.length];
		System.arraycopy(objs, 0, results, 0, results.length);

		return results;
	}
1070332
public static GraphEntity[] toGEArray(Object[] o) {
        GraphEntity[] result = new GraphEntity[o.length];
        System.arraycopy(o, 0, result, 0, o.length);
        return result;
    }
1240051
function toArray(o) {
	let a = new Array(o.length);
	for (let i = 0; i < a.length; i++) {
		a[i] = o[i];
	}
	return a;
}
215266
public static String[] objectArrayToStringArray(final Object[] objectArray) {
		if( objectArray == null ) {
			return null;
		}
		
		final String[] stringArray = new String[objectArray.length];
		for( int i = 0; i < objectArray.length; i++ ) {
			stringArray[i] = objectArray[i] != null ? objectArray[i].toString() : null;
		}
		
		return stringArray;
	}
1198507
public static String[] toStringArray(Object[] objArray) {
        int idx;
        int len = objArray.length;
        String[] strArray = new String[len];

        for (idx = 0; idx < len; idx++) {
            strArray[idx] = objArray[idx].toString();
        }

        return strArray;
    }
1291850
protected Object[] _transform(final Object[] array) {
        Object[] result = new Object[array.length];
        for (Object object : array) {
            ArrayUtils.add(result, transform(object));
        }
        return result;
    }
324191
@SuppressWarnings("rawtypes")
    private Object[] convertToArray(Object obj) {
        // 获取参数的集合信息，并转换成数组
        Object[] values;
        if (obj instanceof Collection) {
            values = ((Collection) obj).toArray();
        } else if (obj.getClass().isArray()) {
            values = (Object[]) obj;
        } else {
            values = new Object[]{obj};
        }
        return values;
    }
402963
function copyOf(o) {
  if (Array.isArray(o)) return o.slice();
  if (isObject(o)) return assign({}, o);
  return o;
}
854219
public String toJson(Object o) {
		try {
			String json = objectMapper.writeValueAsString(o);
			LOG.debug(json);
			return json;
		} catch (Exception e) {
			throw Exceptions.propagate(e);
		}
	}
1190156
public static InputStream convertObjectToInputStream(Object o) throws IOException{
		byte[] bObject = convertObjectToByteArray(o);
		return new ByteArrayInputStream(bObject);
	}
1158385
public Object toArray() {
		if (listeners == EMPTY_OBJECT_ARRAY)
			return Array.newInstance(listenerClass, 0);

		Object[] listenersCopy = listeners;
		Object copy = Array.newInstance(listenerClass, listenersCopy.length);
		System.arraycopy(listenersCopy, 0, copy, 0, listenersCopy.length);
		return copy;
	}