code: private Object getObjectForString(Class<?> type, String values[]) throws Exception{
      if(values == null || values.length == 0)
        throw new Exception("getObjectForString: values was null or of zero length");
      Object array = Array.newInstance(type.getComponentType(), values.length);
      // Now fill in the values for the empty array we just created.
      for(int i = 0; i < values.length; i++)
        Array.set(array, i, getObjectForString(type, values[i]));
      return array;
    }
docs: This method is similar to {@link #getObjectForString(Class, String[])} except that it returns
  an array of type objects. Expects the type variable to be an array.