class ArrayWrapperList extends AbstractList<Object> {

  /**
   * Wraps a given array with a <code>{@link ArrayWrapperList}</code>
   *
   * @param array the array to wrap.
   * @return the wrapped array or {@code null} if the given array was already {@code null}.
   * @throws IllegalArgumentException if the {@code array} is not an array.
   */
  public static ArrayWrapperList wrap(Object array) {<FILL_FUNCTION_BODY>}

  @VisibleForTesting
  final Object array;

  @VisibleForTesting
  ArrayWrapperList(Object array) {
    this.array = array;
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public Object get(int index) {
    checkIsInRange(index);
    return Array.get(array, index);
  }

  private void checkIsInRange(int index) {
    int size = size();
    if (index >= 0 && index < size()) {
      return;
    }
    String message = String.format("Index should be between 0 and %d (inclusive) but was %d", size - 1, index);
    throw new IndexOutOfBoundsException(message);
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public int size() {
    return Array.getLength(array);
  }

  /**
   * Returns the component type of the wrapped array.
   *
   * @return the component type of the wrapped array.
   */
  public Class<?> getComponentType() {
    return array.getClass().getComponentType();
  }
}

    if (array == null) {
      return null;
    }
    checkArgument(array.getClass().isArray(), "The object to wrap should be an array");
    return new ArrayWrapperList(array);
  
<methods>public boolean add(java.lang.Object) ,public void add(int, java.lang.Object) ,public boolean addAll(int, Collection<? extends java.lang.Object>) ,public void clear() ,public boolean equals(java.lang.Object) ,public abstract java.lang.Object get(int) ,public int hashCode() ,public int indexOf(java.lang.Object) ,public Iterator<java.lang.Object> iterator() ,public int lastIndexOf(java.lang.Object) ,public ListIterator<java.lang.Object> listIterator() ,public ListIterator<java.lang.Object> listIterator(int) ,public java.lang.Object remove(int) ,public java.lang.Object set(int, java.lang.Object) ,public List<java.lang.Object> subList(int, int) <variables>protected transient int modCount