public final <S, D> List<D> mapAsList(Iterable<S> source, Type<S> sourceType, Type<D> destinationType, MappingContext context) {
return (List<D>) mapAsCollection(source, sourceType, destinationType, new ArrayList<D>(), context);
}
public <S, D> D[] mapAsArray(D[] destination, Iterable<S> source, Type<S> sourceType, Type<D> destinationType) {
MappingContext context = contextFactory.getContext();
try {
return mapAsArray(destination, source, sourceType, destinationType, context);
} finally {
contextFactory.release(context);
}