/** * Convert the given {@code source}, of type {@code sourceType} to the given {@code targetType}. * * @param <S> The type of data that needs to be converted * @param <T> The target type of the conversion * @param source The object to convert * @param sourceType The source type of the conversion * @param targetType The target type of the conversion * @return The converted object */ protected <S, T> T convert(S source, Class<S> sourceType, Class<T> targetType) { return getConverter().convert(source, sourceType, targetType); }
/** * Convert the given {@code source}, of type {@code sourceType} to the given {@code targetType}. * * @param <S> The type of data that needs to be converted * @param <T> The target type of the conversion * @param source The object to convert * @param sourceType The source type of the conversion * @param targetType The target type of the conversion * @return The converted object */ protected <S, T> T convert(S source, Class<S> sourceType, Class<T> targetType) { return getConverter().convert(source, sourceType, targetType); }
/** * Convert the given {@code source}, of type {@code sourceType} to the given {@code targetType}. * * @param <S> The type of data that needs to be converted * @param <T> The target type of the conversion * @param source The object to convert * @param sourceType The source type of the conversion * @param targetType The target type of the conversion * @return The converted object */ protected <S, T> T convert(S source, Class<S> sourceType, Class<T> targetType) { return getConverter().convert(source, sourceType, targetType); }