public static Object[] toArray(Object list,Class aClass)
public static Object toArray(Object list,Class aClass)
    public static Object[] toArray(Object list,Class aClass)    {        if (list==null)            return (Object[])Array.newInstance(aClass,0);                if (list instanceof List)        {            List l = (List)list;            return l.toArray((Object[])Array.newInstance(aClass,l.size()));        }                Object[] a = (Object[])Array.newInstance(aClass,1);        a[0]=list;        return a;    }