class Utils {

    public static <T, R extends Type<T>> List<R> typeMap(List<T> input, Class<R> destType)
            throws TypeMappingException {

        List<R> result = new ArrayList<R>(input.size());

        if (!input.isEmpty()) {
            try {
                Constructor<R> constructor = destType.getDeclaredConstructor(
                        input.get(0).getClass());
                for (T value : input) {
                    result.add(constructor.newInstance(value));
                }
            } catch (NoSuchMethodException e) {
                throw new TypeMappingException(e);
            } catch (IllegalAccessException e) {
                throw new TypeMappingException(e);
            } catch (InvocationTargetException e) {
                throw new TypeMappingException(e);
            } catch (InstantiationException e) {
                throw new TypeMappingException(e);
            }
        }

        return result;
    }

    private  Utils();

}