array = Array.newInstance(klass, list.size());  for (int i = 0; i < list.size(); i++) Array.set(array, i, list.get(i));
Object tmp = Array.newInstance(klass, length); System.arraycopy(array, 0, tmp, 0, length); array = tmp;
    public Object endContext(Context outerContext) throws AssemblyException    {        if (array == null)        {            array = Array.newInstance(klass, list.size());            for (int i = 0; i < list.size(); i++)                Array.set(array, i, list.get(i));        }        return array;    }