class ArrayConverter implements ConditionalConverter<Object, Object> {
  @Override
  public MatchResult match(Class<?> sourceType, Class<?> destinationType) {
    return Iterables.isIterable(sourceType) && destinationType.isArray() ? MatchResult.FULL
        : MatchResult.NONE;
  }

  @Override
  public Object convert(MappingContext<Object, Object> context) {
    Object source = context.getSource();
    if (source == null)
      return null;

    boolean destinationProvided = context.getDestination() != null;
    Object destination = createDestination(context);

    Class<?> elementType = getElementType(context);
    int index = 0;
    for (Iterator<Object> iterator = Iterables.iterator(source); iterator.hasNext(); index++) {
      Object sourceElement = iterator.next();
      Object element = null;
      if (destinationProvided)
        element = Iterables.getElement(destination, index);
      if (sourceElement != null) {
        MappingContext<?, ?> elementContext = element == null
            ? context.create(sourceElement, elementType)
            : context.create(sourceElement, element);
        element = context.getMappingEngine().map(elementContext);
      }
      Array.set(destination, index, element);
    }

    return destination;
  }

  @SuppressWarnings("all")
  private Object createDestination(MappingContext<Object, Object> context) {<FILL_FUNCTION_BODY>}

  private Class<?> getElementType(MappingContext<Object, Object> context) {
    if (context.getGenericDestinationType() instanceof GenericArrayType)
      return Types.rawTypeFor(context.getGenericDestinationType())
          .getComponentType();
    return context.getDestinationType().getComponentType();
  }
}

    int sourceLength = Iterables.getLength(context.getSource());
    int destinationLength = context.getDestination() != null ? Iterables.getLength(context.getDestination()) : 0;
    int newLength = Math.max(sourceLength, destinationLength);
    Object originalDestination = context.getDestination();

    Class<?> destType = context.getDestinationType();
    Object destination = Array.newInstance(destType.isArray() ? destType.getComponentType() : destType, newLength);
    if (originalDestination != null)
      System.arraycopy(originalDestination, 0, destination, 0, destinationLength);
    return destination;
  
<no_super_class>