package com.hammurapi.convert;

import com.hammurapi.common.Context;

/**
 * Converts objects from one type to another, e.g. Integer to String.
 * @author Pavel
 *
 */
public interface Converter {

	/**
	 * Converts object to requested target type.
	 * @param source Source object.
	 * @param targetType Target type.
	 * @param context Conversion context.
	 * @return Converted object.
	 */
	<S, T> T convert(S source, Class<T> targetType, Context context) throws ConversionException;
}
