code: private <T extends D6Model> T[] toArray(List<Object> objectList, Class<T> modelClazz) {
  
      if (objectList == null) {
        return (T[]) Array.newInstance(modelClazz, 0);
      }
  
      final T[] resultObjects = objectList.toArray((T[]) Array.newInstance(modelClazz, 0));
  
      return resultObjects;
    }
docs: returns Object array from Object List
  
  @param objectList
  @param modelClazz
  @return