Here you can find the source of toObjectArray(T[] v)
public static <T> Object[] toObjectArray(T[] v)
//package com.java2s; //License from project: Apache License public class Main { public static <T> Object[] toObjectArray(T[] v) { Object[] newv = new Object[v.length]; for (int i = 0; i < v.length; i++) newv[i] = v[i];/*from w ww . j a v a 2 s . c o m*/ return newv; } }