public static <K, V> List<V> parallelTransform(ParallelStrategy parallelStrategy, Iterable<K> source, final Function<K, V> function) throws ReflectionsException {
try {
return parallelStrategy.transform(source.iterator(), function);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new ReflectionsException("Multi-threaded execution interrupted", e);
} catch (ExecutionException e) {
throw new ReflectionsException("Error in parallel function execution", e);
}
}