docs: @Pure
  	public static Object doWrapArray(Object object) {
  		if (object == null) {
  			// Nothing to wrap.
  			return null;
  		}
  
  		Class<?> arrayClass = object.getClass();
  
  		if (!arrayClass.isArray()) {
  			// Can't wrap something that isn't an array.
  			return object;
  		}
  
  		if (!arrayClass.getComponentType().isPrimitive()) {
  			// Not a primitive, return generic wrapped object array.
  			return WrappedArray.create((Object[]) object);
  		}
  
  		// Now check for each primitive type individually, and return the appropriate wrapper.
  
  		// These are probably the most used types, check for them first:
  		if (object instanceof int[]) {
  			return WrappedIntegerArray.create((int[]) object);
  		}
  
  		if (object instanceof long[]) {
  			return WrappedLongArray.create((long[]) object);
  		}
  
  		if (object instanceof float[]) {
  			return WrappedFloatArray.create((float[]) object);
  		}
  
  		if (object instanceof double[]) {
  			return WrappedDoubleArray.create((double[]) object);
  		}
  
  		// Now check for the slightly less used types:
  		if (object instanceof byte[]) {
  			return WrappedByteArray.create((byte[]) object);
  		}
  
  		if (object instanceof short[]) {
  			return WrappedShortArray.create((short[]) object);
  		}
  
  		if (object instanceof boolean[]) {
  			return WrappedBooleanArray.create((boolean[]) object);
  		}
  
  		if (object instanceof char[]) {
  			return WrappedCharacterArray.create((char[]) object);
  		}
  
  		// Unrecognized type.
  		throw new ArrayStoreException("Unrecognised type: " + arrayClass.getCanonicalName());
  	}
  
  	/**
  	 * Unwraps {@code object} to extract the original array if and only if {@code object} was previously created by
  	 * {@link #doWrapArray(Object)}. If the array's component type cannot be determined at runtime, {@link Object} is
  	 * used.
  	 * 
  	 * @param value
  	 *            the object to be unwrapped. May be <code>null</code>.
  	 * @return the previously wrapped array if the given value represents such. Otherwise returns the value unmodified.
  	 *         May return <code>null</code> if the value was <code>null</code>.
  	 */
  	@Pure
  	public static Object unwrapArray(Object value) {
  		return unwrapArray(value, Object.class);
  	}